About 9,850 results
Open links in new tab
  1. const - JavaScript | MDN

    Jul 8, 2025 · The const declaration declares block-scoped local variables. The value of a constant can't be changed through reassignment using the assignment operator, but if a constant is an object, its …

  2. JavaScript Const - W3Schools

    Declaring a variable with const is similar to let when it comes to Block Scope. The x declared in the block, in this example, is not the same as the x declared outside the block:

  3. JavaScript const - GeeksforGeeks

    Jul 11, 2025 · The const keyword in JavaScript is a modern way to declare variables, introduced in (ES6). It is used to declare variables whose values need to remain constant throughout the lifetime of …

  4. JavaScript const: Declaring Constants in ES6

    This tutorial shows you how to use the JavaScript const keyword to declare constants whose values are immutable.

  5. const with Object or Array in Javascript - DEV Community

    1 day ago · When you use const to declare objects or arrays in JavaScript, you’re making the variable binding (the reference) immutable — not the contents themselves. This means you cannot assign a …

  6. JavaScript Const - Declaring Constants - ZetCode

    Apr 16, 2025 · Learn how to declare constants in JavaScript using the const keyword, with examples and explanations.

  7. Const in JavaScript: when to use it and is it necessary?

    Jan 20, 2014 · There are two aspects to your questions: what are the technical aspects of using const instead of var and what are the human-related aspects of doing so. The technical difference is …

  8. How to Declare Constants in JavaScript? - W3docs

    Read this tutorial and learn useful information about declaring a constant by using the const keyword which creates a read-only reference to the value.

  9. What does Const Do in JavaScript ? - GeeksforGeeks

    Jun 5, 2024 · const keyword in JavaScript is primarily used for declaring constants. The value of a const variable cannot be reassigned after initialization. Example: This example shows the declaration of an …

  10. JavaScript const Keyword Explained with Examples - sebhastian

    Oct 27, 2023 · The const keyword is used to declare a variable that can’t be changed after its declaration. This keyword is short for constant (which means “doesn’t change”), and it’s used in a …