0

can someone help me with this function please, it prints the desired outcome but it doesnt plug in my variable

can someone help me with this function please, it prints the desired outcome but it doesnt plug in my variable, ive tried puttin it in quotations but it just prints "this.name"... anyone see the error? https://code.sololearn.com/WVCWeecqZtIw/?ref=app

5th Jul 2017, 6:26 PM
Escobar
Escobar - avatar
3 Answers
0
5th Jul 2017, 7:19 PM
Nirav Mehta
Nirav Mehta - avatar
0
Change is document.write(intro.call(p1));
5th Jul 2017, 7:20 PM
Nirav Mehta
Nirav Mehta - avatar
0
IT WORKED!!! but it confuses me like crazy, because in the notes javascript>object>adding methods it attempts to teach me that i dont call the function by the function name but rather the property name then it fails to inform me that i not only need to call my function by its name but furthermore literally have to "CALL" my object to plug in...did i miss something in the notes???
5th Jul 2017, 10:39 PM
Escobar
Escobar - avatar