Skip to content

Instantly share code, notes, and snippets.

@gpbaculio
Created April 25, 2017 17:58
Show Gist options
  • Save gpbaculio/8f219131f178922d34d9caaa65ef3b77 to your computer and use it in GitHub Desktop.
Save gpbaculio/8f219131f178922d34d9caaa65ef3b77 to your computer and use it in GitHub Desktop.
console.log(typeof 9); // typeof is a unary operator, this code logs "number" in the console
console.log(2+2); // addition is an example of a binary operator, requires two numbers, before and after the addition operator
console.log(true ? 1 : 2); // returns the value before the colon if true, in this sample, 1
console.log(false ? 1 : 2); // if false, return the value after the colon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment