First lesson in JS

First lesson in JS
0.0 0

#1
Do not change code above the line
a should have a value of 7
b should have a value of 7
a should be assigned to b with =

// Setup
var a;
var b = 2;

// Only change code below this line
var a =7;
var b = 7;
var

I am sorry everyone but i am a beginer in this, can someone help me?


#2

Hi @legionista24 and welcome to the forum.

The key point here is “a should be assigned to b with =”

Therefore you need to somewhere enter a=b where variable b has the value of 7.

In your code this therefore turns in to…

// Setup
var a;
var b = 2;

// Only change code below this line
var b = 7;
a = b;

And as with all posts in the forum, don’t forget to hit the like button for any posts that have helped and mark any replies that solve your issues as solved!

Good luck


#3

Thank you so much i got it now ! :slight_smile:


#4

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#5

Thank you will do that


#6

Likes are never required, but marking a posted solved keeps others from working on a problem which has already been answered.


#7

Will do that, thank you, sorry i am new here so dont know so much yes