Is Date a primitive data type in JavaScript?
Date is a mutable object that wraps a millisecond timestamp. Learn how to compare, copy, validate and format dates without the usual pitfalls.
466 posts about JavaScript: questions with answers, tutorials and articles, newest first.
Date is a mutable object that wraps a millisecond timestamp. Learn how to compare, copy, validate and format dates without the usual pitfalls.
null is a primitive value in JavaScript, even though typeof null returns object. Learn why, how to test for it, and how to handle it safely.
JavaScript uses one Number type for integers and decimals. Learn why 0.1 + 0.2 is off, how to compare floats safely and how to handle money.
In JavaScript a string is one of seven primitives. This article explains why and compares how Java, Python, C and Go classify strings.
The seven primitive types in JavaScript explained with examples: string, number, bigint, boolean, undefined, null and symbol, plus typeof and falsy values.
JavaScript became universal because browsers require it and runtimes like Node.js carried it to servers, mobile and the edge. See where it fits and where it does not.
JavaScript trips up beginners with async timing, type coercion, scope and the `this` keyword. Each pitfall below has a short example and a fix.
JavaScript remains a core hiring skill because the web depends on it. See which skills employers want, from TypeScript to frameworks, and how to compete.
JavaScript owns the browser, Python leads in data and AI. Compare syntax, performance and use cases side by side and choose the right one.
Java and JavaScript only share part of a name. Compare how they are typed, run and used, with side-by-side code and advice on which to learn first.
Load JavaScript from an external file with defer in the head so it never blocks rendering. Compare head, body end, async, inline and module scripts.
What JavaScript does best, from front-end interfaces and Node.js APIs to cross-platform apps, plus the cases where another language fits better.
JavaScript works for front ends, servers, mobile and desktop apps, tools and serverless. See what it covers and where to use other languages.
JavaScript runs interactive websites, server APIs, mobile and desktop apps, games and developer tools. See real-life uses with short runnable examples.
JavaScript runs in every browser for frontend work and on servers through Node.js, Deno and Bun. See how each side works, with examples.
JavaScript also runs servers, mobile and desktop apps, games, IoT devices and command-line tools. See the main non-web uses with working examples.
JavaScript runs in every browser and on servers, mobile and desktop through Node.js, Deno and Bun. See where it is used and how the language has evolved.
JavaScript powers interactive pages, web apps, servers, mobile and desktop apps and games. See the main practical uses with short, working examples.
Web developers use JavaScript most, but full-stack, mobile, desktop, data and test engineers rely on it too. See who uses it and for what.
JavaScript's main job is client-side scripting: changing the DOM, responding to events, validating forms and fetching data without reloading the page.