Basic JavaScript - Assigning the Value of One Variable to Another

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

// Setup
var a;
a = 7;
var b;

// 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/118.0.0.0 Safari/537.36

Challenge Information:

Basic JavaScript - Assigning the Value of One Variable to Another

1 Like

Hey @muzayyinhakimhalim
You have declared the variables just fine.In Javascript when variables have been declared they can be used without the var key word example

var x;
x=3;
var r;
r=x;

Here the value (3) of x is assigned to the variable r.
hope you understand

1 Like