When JS is enough

Plain JS in the TS playground.

This playground still compiles .ts. Plain JS with JSDoc can be enough for small scripts.

Goal

Log a JSDoc-typed total.

/** @param {number} units */
function total(units: number): number {
  return units * 40;
}
console.log(total(12));
const city = "Nairobi";
console.log(city);
function greet(name: string) {
  return "Hello, " + name;
}
console.log(greet("Eldoret"));
console.log("types still help on kiosk rows");