Що означає a const?
2024 0 Comments
The const declaration creates block-scoped constants, багато як variables declared using the let keyword. Значення значного може бути змінено через реагування (і.е., використовуючи assignment operator), і це може бути реактивне (і.е. через variable declaration).
The const keyword specifies that a variable's value is constant and tells compiler to prevent programmer from modifying it.
Конституційні функції функцій є функціями, які вважаються постійно в програмі. Об'єкт називається цими функціями не може бути змінений. Це є відповідним для використання const keyword з тим, що accidental changes до об'єкта є згодом. A const member function can be called by any type of object.