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
leta=6;
letb=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
letassignment=45
assignment+=6
console.log(assignment)
// Compariosn Opeartors
letc=34
letd=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 (*/