To check what data type something has in javascript is not always the easiest. The language itself provides an operator called typeof for that which works in a straightforward way. Typeof returns a string of what a values data type is, so for an object "object" is returned and for a string "string". However javascripts..
Tag Archives: Booleans
What if and else is The statements if and else in javascript means exactly what they sound like, if something is true do this, or else do something else. Both these statements are used very often in the language in order to control programs data flow. Often when coding you want to be able to..
Expressions In javascript there's something one should know about before learning about booleans. That's expressions which is sort of a collection name for all types of code that results in a value. For example the statement x = 5; is an expression. What happens when the variable x is assigned the value is that first..