GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing javascript.info — What's the result of OR?

  • Tutorial
  • The JavaScript language
  • JavaScript Fundamentals
  • Logical operators
back to the lesson

What's the result of OR?

importance: 5

What is the code below going to output?

alert( null || 2 || undefined );

The answer is 2, that’s the first truthy value.

alert( null || 2 || undefined );
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.