javascript const memory
// Create a memory unit and label it as V
// This label cannot be discarded or reused
const V = { id: 42 };
// Later in the program
V = []; // TypeError: Assignment to constant variable.
javascript const memory
// Create a memory unit and label it as V
// This label cannot be discarded or reused
const V = { id: 42 };
// Later in the program
V = []; // TypeError: Assignment to constant variable.
javascript const memory
// You can do:
V.id = 37; // No errors
console.log(V.id); // 37
// But you still can't do:
V = { id: 37 }; // TypeError: Assignment to constant variable.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us