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
.bar { | |
fill: rgb(51, 153, 204); | |
} | |
.bar:hover { | |
fill: rgb(65, 179, 224); | |
} |
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> | |
<style type="text/css"> | |
.area { | |
fill: rgb(51, 153, 204); | |
clip-path: url(#clip); | |
} | |
.zoom { |
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
// if numRows is > 2: initialize an array that will hold our pascals triangle with [[1], [1, 1]] | |
// generate a loop based on the numRows input and start at i = 2 and initialize a new row | |
// inside each iteration, produce an inner loop of j that will help produce the current row | |
// reach into our pascals triangle array, sum up the appropriate values, and push to our row | |
// finish by pushing a final 1 to the current row and then pushing that row to our pascals triangle array | |
// return our pascals array | |
var generate = function(numRows) { | |
if (numRows === 0) { |
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
/* Write a function that finds the largest possible product of any three numbers | |
* from an array. | |
* | |
* Example: | |
* largestProductOfThree([2, 1, 3, 7]) === 42 | |
* | |
* Extra credit: Make your function handle negative numbers. | |
*/ | |
// Create a convenience function that sorts arrays ascending numerically |
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
/** | |
* Write a function that, given two objects, returns whether or not the two | |
* are deeply equivalent--meaning the structure of the two objects is the | |
* same, and so is the structure of each of their corresponding descendants. | |
* | |
* Examples: | |
* | |
* deepEquals({a:1, b: {c:3}},{a:1, b: {c:3}}); // true | |
* deepEquals({a:1, b: {c:5}},{a:1, b: {c:6}}); // false | |
* |
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
/* | |
* Return an array with the power set of a given string. | |
* Definition of power set: The set of all possible subsets including the empty set. | |
* | |
* Example: | |
* | |
* powerSet("abc") | |
* -> [ '' , 'a', 'b', 'c', 'ab', 'ac', 'bc', 'abc' ] | |
* | |
* Note: |
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
'use strict'; | |
/* Implement the function asyncMap: | |
* | |
* asyncMap has two parameters, an array of asynchronous functions (tasks) and a callback. | |
* Each of the tasks takes a separate callback and invokes that callback when complete. | |
* | |
* The callback passed to asyncMap is then performed on the results of the callbacks of the tasks. | |
* | |
* The order of these results should be the same as the order of the tasks. |