Basic JavaScript - Storing Values with the Assignment Operator

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

// Setup
var a;

// Only change code below this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Challenge Information:

Basic JavaScript - Storing Values with the Assignment Operator

In JavaScript, you can assign a value to a variable like this -

// for example
var a;
a = 7;
console.log(a);

1 Like

You can do both of these:

var a;
a = 5;

Or:

var a = 5;

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.