+ 1
var Hello = 5; if (Hello === 5) { console.log("it's correct"); } else if (typeof(Hello) == 'string'){ console.log("It's not correct"); } else { console.log("Trying again"); } Is it like this?
3rd Feb 2022, 2:09 PM
Irham Maulana
Irham Maulana - avatar
+ 2
Don't put ; at the ending of else if line. Try and see if it works
1st Feb 2022, 2:51 PM
Adi Nath Bhawani
Adi Nath Bhawani - avatar
+ 1
What are you tying to get the code to do? / What is this code trying to achieve?
1st Feb 2022, 2:50 PM
Jory
0
Please send it as code attachment so that we can work with it.
1st Feb 2022, 7:49 PM
Adi Nath Bhawani
Adi Nath Bhawani - avatar
0
var Hello = 10 if(Hello == 5){ console.log("it's correct"); } else if(typeof (Hello) == typeof("Hello")) { console.log("It's not correct"); } else { console.log("Trying again"); }
1st Feb 2022, 7:55 PM
Adi Nath Bhawani
Adi Nath Bhawani - avatar