Once again another batch of work I totally forgot to upload
Tutorials
- Directory
- todo-list-part1.html / todo-list-part1.js
- challenge.html / challenge.js
- todo-list-part2.html / todo-list-part2.js
- array-prob-set.html / array-prob-set.js
- foreach.html / foreach.js
Problem sets
- Directory
- longest-username.html / longest-username.js
- range-array.html / range-array.js
- reverse-array.html / reverse-array.js
Blog question
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? Use an example piece of code with the Enlighter tool to support your description.
pop(): Remove an item from the end of an array
let cats = ['Bob', 'Willy', 'Mini'];
cats.pop(); // ['Bob', 'Willy']
push(): Add items to the end of an array
let cats = ['Bob'];
cats.push('Willy'); // ['Bob', 'Willy']
cats.push('Puff', 'George'); // ['Bob', 'Willy', 'Puff', 'George']
shift(): Remove an item from the beginning of an array
let cats = ['Bob', 'Willy', 'Mini'];
cats.shift(); // ['Willy', 'Mini']
unshift(): Add items to the beginning of an array
let cats = ['Bob'];
cats.unshift('Willy'); // ['Willy', 'Bob']
cats.unshift('Puff', 'George'); // ['Puff', 'George', 'Willy', 'Bob']
Link to an example of a site that is using an array of data that is presented on page. Describe what is in value of the array.
The YouTube comment section of each video uses an array of data to present the comments on the page. When you sort Newest first, it shows the end of the array which is the most recent comments. When you comment under a video, your comment is pushed onto the array. Your username, date, comment, likes/dislikes, and replies are stored into one comment.

Good job keeping up! Your range array and reverse array functions work well. The longest username solution needs to be wrapped in a function though. And when you do, it will allow you to use fewer variables: