Reading-Notes

Reading Notes

Learn HTML

Ordered and Unordered lists.

  1. When should you use an unordered list in your HTML document?

When you have a list of items in which the order is not significant.

  1. How do you change the bullet style of unordered list items?

This can be changed within the CSS.

  1. When should you use an ordered list vs an unorder list in your HTML document?

Using an ordered list would be necessary when the order of the listed items is significant. If the items can be arbitrarily shifted around, then the list can be unordered. Ordered list examples could be driving directions, instruction for constructing something, a recipe, etc. Some examples of an unordered list may be a grocery list, books someone wants to read, a to do list, etc.

  1. Describe two ways you can change the numbers on list items provided by an ordered list?

It can be done in the opening aligator:

Learn CSS

The Box Model.

  1. Describe the CSS properties of margin and padding as characters in a story. What is their role in a story titled: “The Box Model”?

The story is about the main character (Content) and her bestie (Padding) and paddings mom (Margin). Content and Padding are just little girls, so Padding is always around Content and Margin is always in the background to make sure they don’t get lost.

2.List and describe the four parts of an HTML elements box as referred to by the box model.

Learn JS

Arrays. Operators and Expressions. Conditionals. Loops.

  1. What data types can you store inside of an Array?

Strings, numbers, objects, even other arrays.

  1. Is the people array a valid JavaScript array? If so, how can I access the values stored? If not, why?

The people array is vaild JavaScript. If you wanted to reference, say, everyone’s age it would look like this:

–>console.log(people[1]);

const people = [[‘pete’, 32, ‘librarian’, null], [‘Smith’, 40, ‘accountant’, ‘fishing:hiking:rock_climbing’], [‘bill’, null, ‘artist’, null]];

  1. List five shorthand operators for assignment in javascript and describe what they do.
  1. Read the code below and evaluate the last expression and explain what the result would be and why.

let a = 10; let b = ‘dog’; let c = false;

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

10dog

It basically just concatinates the string with the number.

  1. Describe a real world example of when a conditional statement should be used in a JavaScript program.

if the condition of it being before noon is met, then the response of “good morning” could be provided.

  1. Give an example of when a Loop is useful in JavaScript.

If the website utilizes user names or passwords, that would be accomplished by using a loop.