Hard
What isobj.hello
value after executing these few lines of code?
var obj = { hello: 'Hello' }, hello = 'Hello';
obj[hello] += ',';
obj.hello += ' world';
obj['hello'] += '!';
Author: Jean-marie CléryStatus: PublishedQuestion passed 1999 times
Edit
5
Community Evaluations
Auteur anonyme
21/02/2022
Hello there. It seems to be an issue with the english translation. Thank you for the reporting. I fix it !
Auteur anonyme
10/03/2023
I tested the code here and it actually logs "Hello world!". The line `obj[hello] += ','` is useless tho.
Similar QuestionsMore questions about Javascript