Weekly Blogs

Link to My Files

Week 1 – Connecting HTML & JavaScript

JS files can be attached to HTML files by using the script tag to insert the JS into the body of the HTML document.

Crome Console Vs Coding with files

Coding using Chrome or a browser console is only useful if testing, after refreshing the page all changes will be undone. However, using files allows you to save and make changes to JS/HTML

Week 2 – How can you use “falsey-ness” to determine if a string value can be coerced to a number? Why does this work? What is “type coercion” anyway?/ What do you need to convert a for loop into a while loop?

In the Chrome console, you can use “falsey-ness” to determine whether a value of “true” or “false” will be returned. Type coercion is the process of converting one type of value, to another in a different category ex, a string to a boolean.

Week 3 – Describe the difference between declaring a function and calling a function.

Declaring a function simply gives it a name to be recognized by the console. Calling a function that has been declared, or named, will cause it to execute.

Week 4 – With the array methods pop() / push() and shift() / unshift(), explain the difference between the returned value of each method and the resulting value of the array?

The P0p() function deletes the last element from the selected array and enables it for use.

Push() adds a selected value to the very end of an array.

Shift( ) removes the first element in an array and then returns it back as a value.

Unshift() will add a value to the front of an array

This image of a YouTube comment feed is a great example of data organized in an array

Week 5 – Link to an example dynamic web page that likely pulls data from a database to build the site – any social media site, newspaper, blog, etc. Take a screenshot of a typical “post” and propose an object data structure to store all the elements of the post

I chose to use reddit, which features a video clip center-page. I’m sure that the comment section is configure in a list li() format but I am admittedly still confused on how the object is formatted here.

Week 6 – Describe how the querySelector() and querySelectorAll() methods work. What is the difference between the values returned for each method?

The querySelector() function will return an element that matches the specified CSS style selector (1 max). This is different from querySelectorAll() which will return all values that match the query.

Join the Conversation

1 Comment

  1. Nice that you worked through so many of the assignments and answered many of the questions from each week. Just enough!

Leave a comment

Your email address will not be published. Required fields are marked *