Another basic JS question…?

Fine, I’m currently doing a ‘multiple conditions’ exercising and WE thought I’d personally do a alert inline when statement in contrast to the ‘long way’….but POST can’t determine why I get an error in the alert

Possible easily just get it done the way I am shown WE guess, but I have no idea…I thought we’d experiment just a little with this inline if statements…..

That is not really the way in which to utilize the ternary driver and you might be parentheses are not quite right.I personally avoid using it a great deal because WE find the item confusing looking.Of course if i used them more then it could be less confusing, hehe.

Anywho, it goes this way:

problem expression1:expression2;

Expression1 fires in the event the condition well said and expression2 if it is false.The code can be missing expression2.In addition, we can get rid of some parentheses.

The idea should study:

alert((spellingOne === spellingTwo numberOne === numberTwo) “At very least one condition has been met.”:”Neither problem met.”);

alert is always to display a new message, to not check ailments!
Consider w3schools.com.

Leave a Reply