1. We've come a long, long way


#1

I'm confused as to execute this code.

(((3 * 90) === 270) || !(false && (!false)) || "bex".toUpperCase() === "BEX");

var answer = 
    if (3 * 90 === 270) {
        console.log(true);
    } else if (!(false && (!false)) {
        console.log(true);
    }else if ("bex" === "BEX") {
        console.log(true);
    }

#2

This has been figured out.


#3

how did you figure it out?


#4

You would set the variable to true:

var answer = true


#5

I did the same thing but I can't figure it out. It keeps saying "Unexpected token '{'. Expected ')' to end a 'if' condition."

My code is:

var answer = true;
if (3 * 90 === 270) {
console.log(true);
} else if (!(false && (!false)) {
console.log(true);
}else if ("bex" === "BEX") {
console.log(true);
}

What am I doing wrong?


#6

Here is my work:
var answer = true;

if (3 * 90 === 270)

{
console.log(true);
}
else if ( !(false && (!false) ))
{
console.log(true);
}
else
{
console.log(true);
}


#7

var answer = true
if
(((2 * 90) === 270) || !(false && (!false)) || "bex".toUpperCase() === "BEX"){};

It let me go with this:)


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.