Show Menu
Cheatography

JavaScript Technical Interview Cheat Sheet (DRAFT) by

Notes and Tips for Interviews

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Load Text File in NodeJS

const args = process.argv.slice(2);
if (args.length < 1) {
  console.error('Please enter path-to-json-file as first argument.');
  process.exit();
}
require('fs').readFile(args[0], 'utf8', (err, contents) => {
  if (err) throw err;
});

JS Methods

String
void toUppe­rCa­se(), int charCo­deA­t(i­ndex), array match(­reg­exp), str substr­ing­(start [, end]), bool includ­es(­str), str slice(­begin [, end]), str repeat­(count)
Array
arr copyWi­thi­n(t­arget [,start, end])
Map
Set
set add(va­lue); clear(); bool delete­(va­lue); bool has(va­lue);