JavaScript Basics

Go easy on me, as I’m a beginner.

I started learning JavaScript again and have been picking up where I left off on various online websites like Codecademy, etc. The online venues for learning are all different and one could write a book about reviews of each of them and their personal preferences.

JavaScript provides dynamic interactivity on websites and was invented by Brendan Eich, co-founder of the Mozilla project, the Mozilla Foundation, and the Mozilla Corporation.

As I understand it, there are 5 primitive, low-level basic data types in JavaScript. They include numbers, strings, booleans, null and undefined.

The JavaScript (JS for short) programming language is an interpreted language. An interpreted language executes its instructions directly, as opposed to an object-oriented programming language that needs to compile a program from source code into machine code before it can be executed.

Other interpreted programming languages include: Perl, PHP, Python, Ruby, and more.

Some compiled programming languages include: Basic, Objective-C, C#, C++, Cobol, Java, Swift, Visual Basic, and more.

At the core of every programming language is the language’s ability to differentiate between different categories of data.

Quick overview of JavaScript:

NUMBERS can be written with or without a decimal point.

Examples include whole numbers vs. fractional number vs. negative numbers. A modulo is the remainder operator. It’s written as a percentage sign, like this: %.

Anything that you put in quotations is considered a string. ” ”

STRINGS are text, as in “hello world”. They are words, numbers, and characters inside of quotes. They can be single or double quotes. “” or ‘ ‘.

You can use a string that uses both, a double-quoted string with a single quote inside of it. An example would be a contraction, as in “I can’t stop eating Frito’s.”

A concatenation is when two strings are combined, as in “Aeon” + “Flux”. JavaScript would combine them to make “Aeon Flux”. There’s a way to use two sets of quotes “” in one string and that’s by using an escape character. You can use a backslash and double quote to escape out of the string. “\”

Example: “He said \”hello”\”. Another escape character is the backslash itself. To make the backsplash visible, you would use another backslash.

Example: “This is a backslash \\”

Even though there can be multiple words, etc., it’s still considered one string.

BOOLEANS only have two options: true or false.

Null and undefined are values, and there aren’t multiple types.

Oh, and regarding numbers, JavaScript follows the order of operations that regular math follows. To refresh my own memory it’s “PEMDAS”, which is turned into the phrase “Please Excuse My Dear Aunt Sally”. It stands for “Parentheses, Exponents, Multiplication and Division, and Addition and Subtraction”.


To aid me in my journey, I just purchased this book and can’t wait to receive it tomorrow! I’ll let you know what I think of it.

A Smarter Way to Learn JavaScript: The new approach that uses technology to cut your effort in half