File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11# Task
22
3- Write a function that allows you to use ` Array.prototype.slice ` without using ` .call ` to invoke it.
3+ Write a function that allows you to use ` Array.prototype.slice ` without using ` slice .call` or ` slice.apply ` to invoke it.
44
55Normally you have to use ` slice ` with ` call ` or ` apply ` :
66
@@ -50,7 +50,7 @@ nums.slice(1, 2) // [2]
5050
5151* This is absolutely a one liner.
5252* Every JavaScript Function inherits methods such as call, apply and bind from the object ` Function.prototype ` .
53- * Function#call executes whatever the value of ` this ` when it's invoked. e.g. someFunction.call() // ` this ` inside ` call ` is ` someFunction `
53+ * Function#call executes the value of ` this ` when it is invoked. Inside ` someFunction.call() ` , the value of ` this ` will be ` someFunction ` .
5454* Function.call itself is a function thus it inherits from ` Function.prototype `
5555
5656``` js
You can’t perform that action at this time.
0 commit comments