Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
326 changes: 326 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions paperproblems/HOF/problem1.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
/* My answers

It has 2 parameters the first is a variable that is assigned an array the second is the function to be performed on it, so array, function (shocking since this is the HOF question).

what does it do, it loops though each item of the array and if isOdd returns all of the Odd characters and isEven will return all of the even numbers

*/

Someone has given you a function called filter
You don't know what it does, but there are clues at the bottom of this file
Use these clues to describe what filter is.
Specifically:

- How many parameters does it have
- What are the types of the parameters
- What does it do?
Expand Down
6 changes: 6 additions & 0 deletions paperproblems/HOF/problem2.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*

map has two parameters you pass it an array and a function to perform on the array, if you pass it a numbers array and either double or triple it will do math, if you pass it the strings array with up or down it will turn all of the letters to upper or lower case.

*/

Someone has given you a function called map
You don't know what it does, but there are clues at the bottom of this file
Use these clues to describe what map is.
Expand Down
6 changes: 6 additions & 0 deletions paperproblems/HOF/problem3.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/* man I hate this abc shit

f(k) => f(g) where g is k so returns k(3,5), so i is 3 and j is 5 returns 3+2+5*2, 5*2 is 10 + 5 = 15

*/

What is the output of this program? Don't cheat by running it!

function k(i, j) {
Expand Down
7 changes: 7 additions & 0 deletions paperproblems/HOF/problem4.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*

we pass f( k and m), k and m become g and h, return k(m, 1, 4), k(f=m,i=1, j=4) becomes return m(1+2) + 4 * 2, gets to m(3) 6 + 8 = 14


*/

What is the output of this program? Don't cheat by running it!

function m(x) {
Expand Down
8 changes: 4 additions & 4 deletions paperproblems/__proto__/problem2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ x4.__proto__ = x3;
x1.age = 20;
x3.age = 18;

console.log(x1.age);
console.log(x2.age);
console.log(x3.age);
console.log(x4.age);
console.log(x1.age); 20
console.log(x2.age); 20
console.log(x3.age);18
console.log(x4.age);18
5 changes: 4 additions & 1 deletion paperproblems/__proto__/problem3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ You get the following exception:


a) Explain what this exception means.
b) Why does this exception exist? What's wrong with a cyclic __proto__ value?
that there is a loop going from a to b to a to b... so an infinite search for answers.

b) Why does this exception exist? What's wrong with a cyclic __proto__ value?
it will never return anything it will just keep looking.
Loading