Sign in Go Pro

Beginning JavaScript for React Native

And, Or, Not


Up next



The logical operators AND (&&), OR (||) and NOT (!) can be used on values. They allow you to combine logical checks for true or false statements.

And (&&) and or (||) are also "short circuiting", which means they will stop evaluation of the entire line if their specific condition is met. That makes them helpful to use in situations like in the React Native render method - to conditionally display a component on screen.

Summary of Content:

  • How to define and use the logical operations: AND, OR and NOT
  • Greedy or "short circuiting" AND and OR
  • Common usage of && in React Native




There are no comments on this lesson, start the conversation below ...

You need to go PRO to post comments.

Lessons in Beginning JavaScript for React Native