Click here to Skip to main content
15,880,364 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
function movie (title, director) {
this.title = title;
this.director = director;
}

What I have tried:

I'm a bit confused about what things have to be the same and what can be different? Thanks in advance!
Posted
Updated 11-Nov-17 2:33am

1 solution

Although you already have clearly mentioned "property value" I suspect you are referring to "property name" instead.
However, in either case, it's not mandatory to have same name or same value. It all depends on the function you are making and it's purpose. The parameter name is kept as same to avoid any confusion but that sometimes can create confusion and "this" keyword helps in identifying this.

So, the short answer is "NO".

Thanks :)
 
Share this answer
 
Comments
Karthik_Mahalingam 11-Nov-17 9:47am    
5
Suvendu Shekhar Giri 11-Nov-17 10:01am    
Many thanks :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900