DRAG DROP
You are developing an application by using JavaScript.
You must write a function that returns the sum of the variables named v1, v2, v3, v4.
You need to complete the sum function.
How should you complete the relevant code? (To answer, drag the appropriate code segment or
segments to the correct location or locations in the answer area. Use only code segments that apply.)

It is correct
.call passes the object to be taken as ‘This’.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call
0
0
apply and bind do the same regarding to this?
0
0
I’d like to see where this is explained in the exam reference of study guide
0
0
I truly love how this is completely not mentioned in the exam reference (and not the only concept btw). Great work microsoft.
0
0
function add(v1, v2)
{
return v1 + v2 + this.v3 + this.v4;
}
function addValue() {
var o = { v3: 10, v4: 13 };
var res = add.call(o,15, 3)
document.getElementById(“results”).innerHTML = res;
// return res;
}
1
0
that’s the right answer:
function add(v1, v2)
{
return v1 + v2 + this.v3 + this.v4;
}
function addValue() {
var o = { v3: 10, v4: 13 };
var res = add.call(o,15, 3)
return res;
}
0
0
Does Anyone know why those arguments, 15 and 3, in add.call(o,15,3)? What 15 and 3 mean?
0
0
these are the values respectively to v1 and v2, which the user inputs manually
0
0