My reading journal for Code Fellows.
JavaScript is a lightweight, interpreted language with first-class functions. It is most commonly known as a language for web pages, but it also has use in some non-browser environments like Node.js, Apache CouchDB, and Adobe Acrobat.
JavaScript uses variables to create interactive functions. There are three main ways to declare a variable:
let
is used to define a variable where the value can changeconst
is used to define a constant variable where you don’t expect the value to changevar
is old and is really only used in JavaScript that is from 2015 or olderAll JavaScript variables must have unique names and these are some general rules for naming them:
In JavaScript, the equal sign =
is an “assignment” operator, not an “equal to” operator. The “equal to” operator is ==
in JavaScript. JavaScript variables can hold numbers and text values. Text values are called strings and a "string"
is written in quotes. Numbers are written without quotes, but if you do write a number in quotes it will be stored as a string. You can perform many different arithmetic functions by using operators like +
-
*
/
.