Région de recherche :

Date :

https://developer.mozilla.org › fr › docs › Web › JavaScript › Reference › Statements › const

const - JavaScript | MDN - MDN Web Docs

const. La déclaration const permet de créer une constante nommée accessible uniquement en lecture. Cela ne signifie pas que la valeur contenue est immuable, uniquement que l'identifiant ne peut pas être réaffecté. Autrement dit la valeur d'une constante ne peut pas être modifiée par des réaffectations ultérieures.

https://www.w3schools.com › JS › js_const.asp

JavaScript Const - W3Schools

Learn how to use the const keyword in JavaScript to declare variables that cannot be reassigned or redeclared. See the difference between const, let and var, and the block scope, hoisting and browser support of const.

https://developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Statements › const

const - JavaScript | MDN - MDN Web Docs

Learn how to use the const declaration to create immutable variables in JavaScript. See syntax, examples, and differences with let and var declarations.

https://www.w3schools.com › jS › js_array_const.asp

JavaScript Array Const - W3Schools

Learn how to use const to declare arrays in JavaScript and what it means for the array reference and the elements. See examples, browser support, and block scope for const arrays.

https://www.javascripttutorial.net › javascript-const

JavaScript const: Declaring Constants in ES6 - JavaScript Tutorial

Learn how to use the const keyword to create read-only variables in JavaScript. See examples of const with objects, arrays, and for loops.

https://www.w3schools.com › jsref › jsref_const.asp

JavaScript const Statement - W3Schools

Learn how to use the const statement to declare a constant variable in JavaScript. A constant variable cannot be changed after it is declared, unlike a variable declared with var or let. See syntax, parameters, browser support and examples.

https://stackoverflow.com › questions › 21237105

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

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 Node.js): const x = 'const'; const x = 'not-const'; // Will give an error: 'constant 'x' has already been defined'

https://playcode.io › javascript › const

JavaScript const - PlayCode.io

Learn how to use the const keyword to declare variables that cannot be reassigned in JavaScript. See examples of const declarations, assignments, and errors in different scopes.

https://devdoc.net › web › developer.mozilla.org › en-US › docs › const.html

const - JavaScript | MDN

Learn how to declare constants in JavaScript using the const keyword. Constants are block-scoped, immutable, and cannot be reassigned or redeclared.

https://runebook.dev › fr › docs › javascript › statements › const

JavaScript - const [fr] - Runebook.dev

La déclaration const déclare des variables locales de portée bloc. La valeur d'une constante ne peut pas être modifiée par réaffectation à l'aide du assignment operator , mais si une constante est un object , ses propriétés peuvent être ajoutées, mises à jour ou supprimées.