View on GitHub

reading-notes

Johnston - Reading Notes - Home

Code 102, Intro to Software Development

Class 06 - Reading Notes

   

Dynamic web pages with JavaScript

What is Javascript?

 

JavaScript

Summarized from MDN Web Docs

 

JavaScript is a lightweight, interpreted, compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB, and Adobe Acrobat. Java is a very different programming language.

 

JavaScript Variables

 

Variables are “containers for storing data”, and are declared in four ways:

var

let

const

using nothing

 

For older browsers, the var option should be used.

Keywords let and const were added to JS in 2015.

For general rules, use const. If the variable can change, use let.

 

Example:

const price1 = 5;
const price2 = 6;
let total = price1 + price2;

 

JavaScript Identifiers

 

All variables bust be identified with unique names called identifiers.

 

Some general rules for variable names:

Names can contain letters, digits, underscores, and dollar signs.

 

For more rules on variables, visit W3Schools

 

How Computers Really Work

How Computers Really Work Playlist

 

All computers perform four basic functions:

Input, Storage, Processing, Output

 

Input is what we physically do with the device. The information that is given to the computer.

Storage and Processing take that information, and manipulate it with algorithms, saving what is necessary and sending information to the output device(S).

Output is the information we receive from the computer in the form of display, sound, movement, and more.

 

Computers take in, process, store, and output information using thousands of small wires with ‘on’ and ‘off’ signals. These signals are interpreted as *binary*. All input information is translated by the computer into numbers, which are then represented as binary code, and processed into visual, sound, video, and movement outputs. Everthing is based on numbers!

   

https://chrisjohnston1986.github.io/reading-notes/102class06reading