When I typed this apparently innocent snippet of code:
values.name
gedit highlighted name as a keyword. However,
This happened to me also, for example, the following didn't work for me while I was testing the call, bind functions.
var name={
firstname: 'Abhishek',
lastname: 'Agarwal',
fullname: function{
var fname = this.firstname + ' ' + this.lastname;
return fname;
}
function printname(){
console.log(this.fullname());
}
var final=printname.bind(name);
final();
This didn't actually perform the task and instead when I replaced "name" occurences by "myname" or literally anything else, it did work!