About 12,600 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. 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.

  5. 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 …

  6. JavaScript const: Declaring Constants in ES6

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

  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. JavaScript - Constants - Online Tutorials Library

    JavaScript constants are the variables whose values remain unchanged throughout the execution of the program. You can declare constants using the const keyword.

  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: The Ultimate Guide to Mastering Immutable Variables

    Sep 14, 2025 · What does "constant" really mean in JavaScript? And why can you change a const array's elements, but not reassign the array itself? This guide is here to demystify it all. We're going …