Why null is used | SoloLearn: Learn to code for FREE!


Why null is used

4/7/2020 2:10:52 PM

Sarthak Gupta

4 Answers

New Answer


Comment to each quiz is at lower left, not upper right. https://www.sololearn.com/post/131750/?ref=app


I think you are at this lesson https://www.sololearn.com/learn/JavaScript/2978/ But I don't see a lesson or quiz relating to null. Which part are you having problem with?


1st example


Oh I see now. Your question is a good question indeed. Firstly, let us look at Mozilla Doc: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply The first argument to Function.prototype.apply should be this object. "You can assign a different this object when calling an existing function. this refers to the current object (the calling object). With apply, you can write a method once, and then inherit it in another object, without having to rewrite the method for the new object." That's a way of using function with an array to pass into the function as a list arguments, before Spread operator is implemented.