This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>kaltura video</title> | |
<style> | |
#player{ | |
margin: auto; | |
text-align: center; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
// Array to store all feed sources | |
var SOURCES = [ | |
{ | |
displayName: "Reddit", | |
url: "https://www.reddit.com/r/worldnews/top/.json", | |
proxyRequired: true, | |
defaultSource: true, // You can have only one default source | |
formatResponse: function(response) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = { ///<-- This is the creation of a variable called "_" which is a method | |
map: function(list, cbFn) { ///<-- on this line the first key value is function (so a function within the variable method). This function will take to params: list and cbFn | |
var newArray = []; /// within the method's function, there is a new local variable, newArray, which is an empty array | |
list.forEach(function(elem, index) { ///<-- on this line we're showing each element/item created by the parameter "list" | |
var newElem = cbFn(elem, index); ///<-- creating a new variable using the CbFn parameter and the elements and index generated by the list function | |
newArray.push(newElem); /// <-- the newArray variable is using the push vanilla JS method to create an array using the dynamic variables created by newElem | |
}); ///<-- this is closing the list.forEach function | |
return newArray; ///<-- this is the final result of the newArray varaible created by the nested function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var todoCollection = []; | |
$(".main, .footer").hide(); | |
$(".new-todo").keypress(function(e) { | |
// enter key's key number is 13 | |
if (e.which === 13 && $(this).val().length > 1){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b57be26bd9b78e4945d93dc11db8a617 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Question 1 | |
// Convert every price in `prices` into a number using a function that returns an array. | |
// Store the resulting array in a variable named `numPricesArray`. You should not mutuate `prices`. | |
// To see your work, log out the string "numPricesArray" and the actual variable afterwards. | |
// function convert(){ | |
// Number(prices); | |
// console.log(convert); | |
// } | |
// WRITE QUESTION 1 ANSWER HERE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Homework 1 | |
// Hint: You may need SOME of these array iterator methods: | |
// .map(), .filter(), .forEach() , .some(), .every() | |
// Hint: You may also need SOME of the following methods: | |
// Number(), .reverse(), typeof(), .join() | |
// Let's say we have an array of prices named `prices`. | |
var prices = ['100', '125', '129', '37', '38', '75', '87', '94', '300', '301', | |
'305', '50', '0.30', '0.01', '0.5', '5', '15', '24', '35', '1041', '1', '17', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("hello world"); |