JavaScript

GitMoji License: MIT Lines Of Code CodeQL Lint

JavaScript is the world's most popular programming language and it is very cool.

All here runs whith Deno, not Node.js.

FAQ

  • "Hey, everything here is TypeScript, not Javascript!"

It's because I had a lot of functions like:

/**
 * @param {number[]} arr
 * @param {number} max
 */

function biggerThan(arr, max) {
  return arr.filter((num) => num > max);
}

And in TypeScript it would be:

function biggerThan(arr: number[], max: number) {
  return arr.filter((num) => num > max);
}

Deno treats TypeScript as a first-class language, this means that configuration is not necessary and you can import Typescript files into Javascript files without any problem, so it was very easy to port all to Typescript.

I ended up passing even what was not needed to TypeScript because I didn't like that the repository was half TypeScript and half JavaScript.

Bookmarks

Things that I liked and I want to save them to review them in some future.