Skip to content

Instantly share code, notes, and snippets.

View ferontv's full-sized avatar

ferontv

View GitHub Profile
@ferontv
ferontv / flatarray.js
Created February 22, 2019 02:57
Exercise to flatten arrays from nested arrays
const flatArray = (nestArr, outRng, aux) => {
if(!aux){ aux = []} //aux empty
if (outRng) {
return aux.concat(...nestArr); //spread op
}
for(let i=0; i<nestArr.length; i++){
if(nestArr[i].constructor == Array){
flatArray(nestArr[i],outRng,aux); //recursive
@ferontv
ferontv / README.md
Created August 29, 2018 05:44 — forked from hofmannsven/README.md
My simply Git Cheatsheet