JavaScript 30- Day 9 Study Notes

https://javascript30.com/

Day 9 of JavaScript 30 by Wes Bos covered several developer tools available in the console. It offered a quick run-down of tips and tricks. Of course, I have used console.log before and I was somewhat familiar with using the inspection tools. But I hadn’t used much else, and to be honest, I didn’t know about the F12 shortcut before this lesson.

Bos used a simple array of objects named “dogs”.

We worked exclusively in the developer tools console as opposed to seeing changes in the viewport.

Interpolation

Using “%s” allows a variable to be inserted within a string.

The console will show “hello I am a * string!” We can use a template literal to insert a variable.

Warning

This will display a warning message on the console.

Error

This will display an error message.

Information

This will display an information message.

Testing

If the initial input is true, nothing will display. If false, “That is wrong” will display in the console.

Clearing the console

This was neat. I had previously used the drop-down menu to do this.

Viewing DOM elements

Grouping

This will display each object in the array with a drop-down menu of its elements.

Counting

Counts the number of appearances of ‘Wes”.

Timing

This will display the amount of time to fetch data.

Table

This will display the array as a table.

So Day 9 was not really a coding project but a short and concise crash course in using the console.

View more of my study notes:

Retired physician, writer, aspiring website designer and developer