This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const input = process.argv.slice(2); | |
const slashes = String.raw`${input[0]}`; | |
let output = ""; | |
const verticalSlashes = (count, input) => { | |
if (input.length === 0) return ""; | |
const currSlash = input[0] | |
switch (currSlash) { | |
case "/": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Goal is a simple (naive?) test to show performance differences in Maps vs Objects. | |
**/ | |
//Insert entries into Map | |
const start = Date.now() | |
let testmap = new Map() | |
for (let i = 0; i < 1000000; i++) { | |
testmap.set(i, i) | |
} |