Skip to content

Commit 88ae384

Browse files
Trotttimoxley
authored andcommitted
clarify call prohibition and value of this inside call
1 parent f522a35 commit 88ae384

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/function_call/problem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

55
Normally 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

0 commit comments

Comments
 (0)