+ 1
JavaScript if else
How exactly that works?
3 odpowiedzi
+ 9
If-else is condition based boolean thing
This have 2 blocks of code, one in if condition another in else.
if(2<3){
console.log('2');
}
else{
console.log('3');
}
The condition with 'if' is checked, if the condition(I.e. 2<3) is true, the if block will be executed, if it false, then else block will be executed...
https://www.sololearn.com/learn/JavaScript/1137/
//you should start the JS code😅
+ 1
If statement you allows to perform a bloc instructions whether a condition are valid or not.
0
Thank you