Skip to main content

Showing tag results for Operators

Posts

0 comments 0 reactions

How to Use Optional Chaining (?.) in JavaScript

Jagdish Kumawat

Optional chaining, ?., reads a property only when the value before it exists. When that value is null or undefined, you get undefined instead of an error.

  • Programming
  • JavaScript
0 comments 0 reactions

How to Use the && Operator in JavaScript

Jagdish Kumawat

a && b gives back b when a is truthy, and a when a is falsy, so it can read a property only when its object exists.

  • Programming
  • JavaScript
0 comments 0 reactions

How to Check if a Value Is null in JavaScript

Jagdish Kumawat

Compare a value with === null to find out whether it’s empty on purpose, and with !== null to check that it holds something.

  • Programming
  • JavaScript
0 comments 0 reactions

How to Use the NOT Operator (!) in JavaScript

Jagdish Kumawat

Put ! in front of a value to get true when the value is missing or empty, and false when it’s there.

  • Programming
  • JavaScript