-
Notifications
You must be signed in to change notification settings - Fork 1
Description
1.Write a function that would allow you to do this:
let addSix = createBase(6);
addSix(10); // returns 16
addSix(21); // returns 27
In this question it was meant to add up everything once the function is triggered. Your answer is bulky, and doesn’t provide answer the question. See if you can fix it.
let newArr = myArr.filter(function (val, index, self) {
return self.indexOf(val) === index;
});
This looks supercool, but how did you come up with this idea?
Step4, Q2: if array is from 10 to 15, your code should generate an array like [10,11,12,13,14,15]
But important is the output. Your code partially works, and you did a good job, but didn’t understand the question very well I guess. I am not sure but when I changed your parameters to 10,15, it prints 10,12,15. Maybe it should have print “sayFive, sayThree, sayThree, sayFive”, or actually show why sayThree and sayFive is called, which I try to show it in my hw.
I don’t see the answer for Q3 to Q7. We get sometimes very busy, I understand.
Please fix the issues before closing this issue. Good luck!
PS: I see your other issues still open, please review and close them too.