Control flow; !true vs false


#1

This error message contradict itself and I do not know what to change here?


#2

Hi inside you if statement you should put === isntaed of =


#3

option1:

var programming = false
if (programming = !true){ // do something }

option2:

var programming = false
if (programming != true){ // do something }

option1, you assign (you use a single equal sign to assign) a value of !true (aka false), which means the condition is false, else will run

In option2, you compare if programming (which is false (you defined it the line above)) if it doesn't equal true. True does not equal false, the condition is true, the if statement will run. There is a huge difference where you put the exclamation mark