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 1854 times
Edit
3
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
7
Which of the following equality(s) are true? 0 == '', 'f' + 1 == 'f1'6
What can we say about the following code?6
Write a Javascript code that prints the indexes of an array.5
How to overwrite a property in an object in Javascript4
Write a Javascript code that displays the contents of the table : Peter, Paul, Jacques, and the length of the table.