Animations

API

Arrays

Async

Basics

Challenges

Classes

Console

Dates

Debugging

DOM Elements

DOM Methods

DOM Navigation

DOM Properties

Event Listeners

Flow Control

Forms

Functions

Global Functions

JSON

Keywords

Libraries (3rd party)

Math

Modules

Objects

Snippets

String

Types

Widgets

Window Object

JavaScript - Truthy / Falsy

Falsy:

var y = "We are the so-called "Vikings" from the north."

  • null
  • undefined
  • NaN
  • empty string
  • 0

alert(0 == false);
// true. Will return true because 0 is the default value for false but in reality,
// it is comparing a integer to a boolean and should return false.

alert(0 === false); // false