Reading Notes
HTML, CSS, and JavaScript the three languages of a website
<html>
provides the structure and content of a web page{css}
styles the webpage and defines how the content is displayedjavascript()
controls how the page behavesJavaScript plain text language so it does not require any additional tools to start
Link to Do Along project pages 46-49
Objects and Methods
document.write('Good afternoon!');
document
= Object the document
object represents the entire page.
= Member Operatorwrite('Good afternoon!')
= Method allows new content to be written into the page where the <script>
element sits'Good afternoon!'
= Parameters whenever a method requires some info to work, data is given inside the parenthesesJavaScript runs where it is found in the html, location maters.
Chrome Developer Tools Shortcuts
opt + cmd + U
opt + cmd + I
opt + cmd + C
opt + cmd + J
Script set of step by step instrucitons that a computer can follow, each should end with a ;
{}
indicate the begining and ending of a code block;
{}
to form a singular related code block/*comment*/
Format for a multiline comment//comment
Format for a single line commentVariables
var quantity;
var
= Variable Keywordquantity;
= Variable Name sometimes called an identifier
oneTwoThreeFour
quantity = 3;
quantity
= Variable name=
= Assignment operator3
= Variable valueData Types
Numeric Data Types | String Data Types | Boolean Data Types |
---|---|---|
Example = 0.75 |
Example = 'Hi, Ivy!' |
Example = true |
For tasks involving counting or sums | Enclosed in a pair of single or double quotes used for working with text | True / False |
Strings must always be surrounded by quotes either "string"
or 'string'
but not a combination. It must also be on one line.
6 Rules for naming variables
$
, or underscore _
-
, or dots .
are allowed in a nameComputers take in information, stores info, processes it, and outputs calculation resutls.
Data and Binary
Circuits and Logic
Memory, CPU, Input, and Output
Hardware and Software