Skip to content

Instantly share code, notes, and snippets.

Zoryana Vakh zoryana94

Block or report user

Report or block zoryana94

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View flatten-array.js
const arr = [[1,2,[3]],4];
function flattenArray(arr = []) {
let flattenedArray = [];
arr.forEach(item => {
if (Array.isArray(item)) {
flattenedArray = [...flattenedArray, ...flattenArray(item)];
} else {
zoryana94 /
Created Feb 26, 2017 — forked from staltz/
The introduction to Reactive Programming you've been missing
You can’t perform that action at this time.