Bubble Foundry


Javascript Primitives

by Peter.

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 around a string primitive. All primitives are immutable.

Did you know that all Javascript primatives are immutable? I sure didn’t.