JavaScript Variable Hoisting: var, let, const and TDZ
Hoisting makes every declaration exist from the start of its scope. var reads as undefined, let, const and class throw in the temporal dead zone, and function declarations work anywhere.
TypeScript is a popular open-source programming language developed and maintained by Microsoft. It is a statically typed superset of JavaScript that adds optional static typing and other features to help developers write more robust and maintainable code.
TypeScript compiles to plain JavaScript, making it compatible with all JavaScript environments and runtimes.
Hoisting makes every declaration exist from the start of its scope. var reads as undefined, let, const and class throw in the temporal dead zone, and function declarations work anywhere.
JavaScript has eight falsy values; everything else, including “0”, [] and {}, is truthy. Learn where the conversion happens, how TypeScript narrows with it, and the bugs it causes.
A transpiler outputs source code at the same level as its input; a classic compiler outputs bytecode or machine code. Real javac, tsc and Node.js output shows the difference.
Mask passwords, card numbers, emails and tokens before they reach a log file, using a JSON.stringify() replacer, a structuredClone() copy, regex for free text, toJSON(), and pino’s redact option.
Learn Jasmine unit testing with TypeScript on Node.js 22. Set up Jasmine 7, write specs with matchers and hooks, replace dependencies with spies, and test async code and timers.
A JavaScript global variable is a property of globalThis or a top-level declaration in a classic script. Learn how var, let and const behave in scripts, ES modules and CommonJS, why strict mode rejects implicit globals, and how to type globals in TypeScript.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.