Skip to content

Instantly share code, notes, and snippets.

View Bronzdragon's full-sized avatar

Walter Bormans Bronzdragon

  • Europe
  • 12:50 (UTC +01:00)
View GitHub Profile
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
/* JavaScript ES6
* This function takes in an array, and flattens any nested arrays, while
* maintaining internal order. It then outputs this as a new array, keeping the
* old one untouched.
*/
function FlattenArrays(baseArray) {
if (!Array.isArray(baseArray)) {
throw new TypeError('You did not provide an array.');
}