Variables
Declaring variables
// Example: Declare a local variable named 'size'
// and assign it the text value "medium".
let size = "medium";
// Now, we can refer to 'size' to access the value "medium":
let result = size;
return result; // The returned value will be "medium".// Example: these are all valid variable names.
let x2 = 1;
let number_of_items = 2;
let réduction = 0.4;Updating variables
Last updated
Was this helpful?