in the following, the variable name was never declared. The value is returned as the string "result". Isn't this incorrect, shouldn't it be "undefined"?
let obj = {
name: name,
age: "23"
}
alert(obj.name);
or
obj = {
name,
age: "23"
}
alert(obj.name);
Aucun commentaire:
Enregistrer un commentaire