0
Why we use exclamatory(!!) sign and double equal (==) ?? Plz explain!!
if(n1.value != '' && n2.value != '') { if(n1.value == n2.value) }
3 Respuestas
+ 1
The exclamation mark simply means "not", while double equal is to check for "equality".
Basically, this code is checking if n1.value is not an empty string and if n2.value is not an empty string in the first if statement; while in the second if statement, it's checking if n1.value is equal to n2.value
0
thanks bro, what about '&&' sign? why it is used in javascript??
0
The '&&' sign is used to check if both values on left and right sides of the sign are true. It is known as the 'logical and' sign