``` // Flat const array = ['ab', ['123', 13, [ 321 ], 123 ], 32123, 327] function flat (array) { array.map(element => { if (element.isArray()) { flat() } return JSON.stringfy(element) }) } // Invert String function stringInvert (string) { const strArray = string.split('') const newArray = [] for (let i = strArray.length; i > 0; i--) { newArray.push(strArray[i]) } return newArray } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up