Looking for confirmation that am on the right track

Hi, so the question is:

In the final task for this article, we want you to write some tests. You’ve got three groups, each consisting of a statement and two variables. For each one, write a test that proves or disproves the statement made. Store the results of those tests in variables called weightComparison , heightComparison , and pwdMatch , respectively.

and my code is:


// Statement 1: The elephant weights less than the mouse
let eleWeight = 1000;
let mouseWeight = 2;



if (eleWeight > mouseWeight){
eleWeight= weightComparison;
}
1000

// Statement 3: The two passwords match
let pwd1 = 'stromboli';
let pwd2 = 'stROmBoLi'

if (pwd1===pwd2){pwdMatch='they match';} else {"they don't match";}
"they don't match"

Am I on the right track?

assignments work right to left, what’s to the right is stored in what’s to the left
what’s weightComparison? where have you defined it? you are overwriting the value of eleWeight with this

here you are assigning a string to pwdMatch

here there is just a floating string and no assignment

if you need to see your code executed, look at it with this:
http://pythontutor.com/javascript.html

My bad. I just edited in the statements the question provides context for so that should clear things up. I also made the change so storing the right value occurs. Other than that, let me know if I’m on the right track. After months of studying coding, i feel i am finally making headway with js at least. I use the console on devtools to double check the code

I don’t know without seeing your updated code

I think you need to store in weightComparison the answer to the statement

you are probably making it much more complex than needed

let weightComparison = // how do you check if eleWeight is smaller than mouseWeight?