February 7th 2018
Hello! At the ES6 course by Wes Bos I learned about the ES6-Array method from() and of() which are not part of the prototype.
from() - it will take something that looks like an array and turn into a true array, when working with DOM elements
const peopleArray = Array.from(people, person => {
console.log(person);
.find() -
.findIndex()
const post = posts.find(post => post.code === code);
const postIndex = posts.findIndex(post => post.code === code);
When you have a data that comes back from an API, posts array each item is an object.
.some() and .every() will check the data in an array to check if some or all of the items meet what we are looking for
In the CSS grid course we made a Codepen lookalike.
And at the Web Development Bootcamp I continue to work on the ToDo list, we used jQuery to code the functionality. Adding and removing todos on the list.
$("ul").on("click", "span", function(event) {
$(this).parent().fadeOut(500, function(){
$(this).remove();
});
event.stopPropagation();
})
The .stopPropagation stops the event from bubbling up and the .parent() removes the list elements.
Cheers!