Answers for "js . operator"

2

js ? operator

condition ? ifTrue : ifFalse

//examples:

let doILikeIceCream = true
console.log(`I ${doILikeIceCream ? 'like' : 'dislike'} icecream.`)
//output: I like icecream

let doILikeIceCream = false
console.log(`I ${doILikeIceCream ? 'like' : 'dislike'} icecream.`)
//output: I dislike icecream
Posted by: Guest on December-20-2021
0

js operator

/* 
JavaScript includes operators as in other languages. An operator performs
some operation on single or multiple operands (data value) and produces a
result. For example 1 + 2, where + sign is an operator and 1 is left operand
and 2 is right operand. + operator adds two numeric values and produces a
result which is 3 in this case.
*/
Posted by: Guest on March-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language