Bubble Foundry

Posts tagged with: primitives

Javascript Type Gotchas
typeof null // -> object null instanceof null // -> TypeError: Can't use instanceof on a non-object. true instanceof Boolean // -> false true == new Boolean(true) // -> true true === new Boolean(true) // -> false Needless to say, this is very annoying if you’re trying to be be careful with your types and […] Read more – ‘Javascript Type Gotchas’.
Javascript Primitives
From the Mozilla Javascript Glossary: primitive, primitive value A data that is not an object and does not have any methods. JavaScript has 5 primitive datatypes: string, number, boolean, null, undefined. With the exception of null and undefined, all primitives values have object equivalents which wrap around the primitive values, e.g. a String object wraps […] Read more – ‘Javascript Primitives’.