I'm confused with some Lambda JavaScript classroom precourse work.
austinlingle99 (0)

First off I'd like to say I've not been coding long at all. I've just started learning about a week ago. So i've obviously gone through their HTML and CSS work already. Now I'm on their JavaScript assignment and I'm so confused by it.
It says you don't need to write any code for the exercise. But it wants you to create a variable called difference. and subtract num2 from num1.
So I've tried

difference.num2 - num1;
difference.num2 - num1 =;

and i've tried num2 - num1 = ; which is exactly how it's shown to do it in the lessons.
I've tried the same thing but making the variables a number and everything I try is wrong.
Sorry if this isn't the right place to ask these types of questions I just have no clue what I'm doing wrong or where to go. I've tried everything I can think of and gone through my notes and everything shown in the videos and don't know what I'm doing at all...

You are viewing a single comment. View All
vedprad1 (815)

First of all, you have come to the right place to ask questions.
Second, you should check w3schools.com, because they have good js references.

Anyways, here are some tips to help you:
1. Remember that you need to start with var before assigning anything.
2. Remember that you assign the value on the right side of the equal sign to the variable on the left.

If you are still confused on what the answer is, just reply to this post, and I will show the answer.

If this answers your question, please check the checkmark on the left side of this message. Thanks ans Good Luck!

austinlingle99 (0)

@vedprad1 Thanks for the offer but I'd prefer to figure out something rather than answers. Since that won't help me learn if I'm just given answers. And I figured most of the questions out. I was being stupid and making things more complicated than what they wanted.

vedprad1 (815)

@austinlingle99 : If this did answer your question, could you mark the original answer as correct? Thanks!