filmov
tv
JavaScript - Comparison and Logical Operators

Показать описание
Hey guys, in this video we will learn about Comparison and Logical Operators in JavaScript.
Practice Problems:
================
Try to answer the following questions without executing the code in codepen. Post your answers in the comment section below. Best of Luck!!
Q.
What will be printed in the console?
var a = 10;
var b = 5;
var c = 12;
var e = 8;
var d;
d = parseInt((a * (c - b) / e + (b + c)) %3C= (e * (c + a) / (b + c) + a)); // %3C= --- "Lesser than or equal to" operator
if (d == 1){
} else {
}
Q.
What will be printed in the console?
var n = 2;
var p = 4;
var q = 5;
var w = 3;
if ( !((p * q) /n %3C= (q * w) + n/p )) // %3C= ---- "Lesser than or equal to" operator
{
}
else
{
}
My Twitter Handle: @qaifikhan