reading-notes

🗒️ Class 03 HTML Lists, Control Flow with JS, and the CSS Box Model

Reading Notes

Learning HTML

Learning CSS

Learning JS

  For example,  
  concole.log(person[1]) // Arrays start with 0 then counts up.
 const people = [
  ['pete', 32, 'librarian', null], 
  ['Smith', 40, 'accountant', 'fishing:hiking:rock_climbing'], 
  ['bill', null, 'artist', null]
  ];

 let a = 10;
 let b = 'dog';
 let c = false;

 // evaluate this
 (a + c) + b;

Lecture Notes

arrays

let people = [‘p1’] // array name is people people.length // displays length

Adding to Array

people.push(‘p2’) // adds to the end array people.unshift(‘p3’) // adds to beginning of array

Removing from Array

people.pop() // drops the last item in an array people.shift() // drops the first item in an array

loops

for

for (initialize; condition; increment){ //code to execute }

while

initialize somewhere above loop

while (condition){ // code to execute // increment/break }

do while

will run at least once

do { // code to run } while (condition)

Things i want to learn