About 535,000 results
Open links in new tab
  1. JavaScript Const - W3Schools

    When to use JavaScript const? Always declare a variable with const when you know that the value should not be changed. Use const when you declare: A new Array; A new Object; A new …

  2. const - JavaScript | MDN - MDN Web Docs

    Mar 19, 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 …

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

    Jan 20, 2014 · I've recently come across the const keyword in JavaScript. From what I can tell, it is used to create immutable variables, and I've tested to ensure that it cannot be redefined (in …

  4. JavaScript const - GeeksforGeeks

    Feb 12, 2025 · It is used to declare variables whose values need to remain constant throughout the lifetime of the application. const is block-scoped, similar to let, and is useful for ensuring …

  5. JavaScript const: Declaring Constants in ES6 - JavaScript Tutorial

    ES6 provides a new way of declaring a constant by using the const keyword. The const keyword creates a read-only reference to a value. By convention, the constant identifiers are in …

  6. JavaScript Const: Constant Variable Declaration and Usage

    Aug 20, 2024 · The const keyword in JavaScript is used to declare constants – variables whose values cannot be reassigned once they are initialized. This immutability brings a new level of …

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

  8. JavaScript Const - Declaring Constants - ZetCode

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

  9. Const in JavaScript when to use it and is it necessary

    Apr 18, 2025 · const declares variables with a changeless worth. This means erstwhile a worth is assigned to a const adaptable, it can’t beryllium reassigned. This behaviour differs importantly …

  10. JavaScript Variables – A Beginner's Guide to var, const, and let

    Nov 30, 2020 · In JavaScript, you can declare variables by using the keywords var, const, or let. In this article, you’ll learn why we use variables, how to use them, and the differences between …

  11. Some results have been removed
Refresh