0

cant get tcantcode right can soneone help please

need help error somewhere in code and cant find out what it is the fuction just wont work https://code.sololearn.com/WVCWeecqZtIw/?ref=app

5th Jul 2017, 12:44 AM
Escobar
Escobar - avatar
8 Réponses
+ 2
fix this alert(hi, my name is this.name = "name") to this alert("hi, my name is " + this.name)
5th Jul 2017, 12:46 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 2
i dont even know why your code doesnt work tbh
5th Jul 2017, 1:53 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 2
id do this, this.primero = "hi, my name is " + this.name delete the intro()
5th Jul 2017, 10:08 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 2
yeah dont add any intro function because if u do that, the this.name inside the function will refer to the function itself and the function doesnt have the name property so it will return undefined
5th Jul 2017, 10:44 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
0
IT WORKS!!!! THANKS A BUNCH, id have never guessed the quotation marks were in the wrong spot...thanks again
5th Jul 2017, 1:44 AM
Escobar
Escobar - avatar
0
but you were right though, the quotation marks were the issue, but now im at the next issue, ive gotten the function to print what needs to be printed but now the variable wont plug in, it keeps just printing "this.name" instead of the actual variables value, any idea? if its not too much to ask???
5th Jul 2017, 6:22 PM
Escobar
Escobar - avatar
0
that makes sense, but doesnt it delete the purpose of adding a method, or is that route just irrellevant?
5th Jul 2017, 10:35 PM
Escobar
Escobar - avatar