Numbers in JavaScript: IEEE 754, Safe Integers, BigInt
How JavaScript stores numbers as 64-bit IEEE 754 floats, why Number.MAX_SAFE_INTEGER is 2^53 - 1, and when to use BigInt for larger integers.
How JavaScript stores numbers as 64-bit IEEE 754 floats, why Number.MAX_SAFE_INTEGER is 2^53 - 1, and when to use BigInt for larger integers.
JavaScript Date cheatsheet: create dates, use getters and setters, compare and format dates, add days or hours, and get the difference between two dates.
HTML Canvas API cheatsheet: set up a canvas, get a 2D context, and draw rectangles, circles, lines, text, and images, plus transformations and shadows.
In this article, we will cover some JavaScript snippets that are commonly used in coding interviews. These snippets will help you solve coding problems more efficiently and effectively.
How the nullish coalescing operator (??) works in JavaScript, how it differs from logical OR (||) with falsy values like 0 and '', and when to use it.
Sort arrays in JavaScript with sort(): numbers with a compare function, ascending or descending order, strings with localeCompare(), and reverse().