Strings

Strings are what you expect them to be. Any bunch of characters, enclosed in single or double quotes. Characters are escaped or given special meaning using a \ followed by a character. \n, \t, \" all work as expected.

Booleans

Booleans are - wait for it - either true or false. It's not so much the data type but the way the operators behave, that makes javascript's boolean world so awesome and different.

Operators

We all know BODMAS and the usual +, -, *, /, % behaviour with numbers.

+ works on strings as a concatenator

- can be used as a unary operator

+=, -=, ++ and -- are all part of the language and work as expected

Logical Operations

When you compare two values of the same type, things work as expected. When you perform a logical operation between two values of different types, javascript automatically typecasts then evaluates and throws out a boolean. This scares people. I don't think it's all that bad and find it quite intuitive. Let's try and learn how it works by example.