You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log("JavaScript Operators,Expressions and Comments")
// Arthemetic Operators
let a = 6;
let b = 8;
console.log("a+b = ", a + b)
console.log("a-b = ", a - b)
console.log("a*b = ", a * b)
console.log("a/b = ", a / b)
console.log("a**b = ", a ** b)
console.log("a++ = ", a++)
console.log("a%b = ", a % b)
console.log("a-- = ", a--)
// Assignment Operators
let assignment=45
assignment+=6
console.log(assignment)
// Compariosn Opeartors
let c=34
let d=3
console.log("c==d is ",c == d)
console.log("c=!d is ",c != d)
console.log("c===d is ",c === d)
console.log("c!==d is ",c !== d)
//Logical Operators
console.log(c>d && d>c)
console.log("c||d is ",c||d)
/* 7+8=15
where 7 and is operands,+ is operator and 15 is result
Comments:
JavaScript comments can be used to explain JavaScript code, and to make it more readable. JavaScript comments can also be used to prevent execution.Javascript multiline comments, also known as block comments, start with a forward slash followed by an asterisk (/*) and end with an asterisk followed by a forward slash (*/