reading-notes

My reading notes


Project maintained by brandomoki Hosted on GitHub Pages — Theme by mattgraham

Reading Day 3

HTML

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

    • You would want to use an unordered list when you need bullets and the order doesnt matter.
  2. How do you change the bullet style of unordered list items?

    • Use the type attribute or the nesting level
  3. When should you use an ordered list vs an unorder list in your HTML document?

    • When the specific order of the list matters and must be listed in order.
  4. Describe two ways you can change the numbers on list items provided by an ordered list?

    • 1.<ol type='1'> 2.<ol type='a'>

CSS

  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 padding surronds the content the inner most layer. Margin is the outer most layer.
  2. List and describe the four parts of an HTML elements box as referred to by the box model.

    1. Content box this is where content is displayed

    2. Padding box this surronds the content

    3. Border box wraps the padding

    4. Margin box is the outer most layer

JS

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

    • Arrays are meant for list type items and can store strings, numbers, and objects.
  2. Is the people array a valid JavaScript array? If so, how can I access the values stored? If not, why?

    • Yes it is valid and you can access values by calling its index
  3. List five shorthand operators for assignment in javascript and describe what they do.

    1. Assingnment = assings value to variable

    2. Addition += adds value to the right opperand to a variable

    3. Subtraction -= subtracts the value of the right operand from a variable

    4. Division /= devides the value

    5. Remainder %= devides the value and assigns the remainder

  4. Read the code below and evaluate the last expression and explain what the result would be and why.

    • results would be 10 since youre comparing 3 different types of expressions Arithmetic, String, and Logical.
  5. Describe a real world example of when a conditional statement should be used in a JavaScript program.

    • real world application is if you want the user to decide what happens next.
  6. Give an example of when a Loop is useful in JavaScript.

    • using a loop to grant access with a password