freeCodeCamp/guide/english/certifications/javascript-algorithms-and-d.../basic-javascript/initializing-variables-with.../index.md

416 B

title
Initializing Variables with the Assignment Operator

Initializing Variables with the Assignment Operator

To initialize a variable is to give it an initial value. You can declare and initialize a variable like so:

var num = 5; // This is equal to 5