+ 1

Question about JS object

https://code.sololearn.com/W75KYSRcNw0f/?ref=app In the code, the prompt ask for the input and assign it to x. When I put "obj2", how can I access that object?

17th Aug 2018, 1:17 PM
Alquen
Alquen - avatar
6 Answers
17th Aug 2018, 1:36 PM
Just A Rather Ridiculously Long Username
+ 2
Alquen If I understand you correctly, I'll say you are trying to ask the user for the object's name ? Then you try to assess the x property of the object with that name. Am I right or wrong
17th Aug 2018, 1:35 PM
Dlite
Dlite - avatar
+ 2
Just A Rather Ridiculously Long Username already answered that question
17th Aug 2018, 1:40 PM
Dlite
Dlite - avatar
+ 1
Yup is that possible Yahiko
17th Aug 2018, 1:37 PM
Alquen
Alquen - avatar
17th Aug 2018, 1:53 PM
Alquen
Alquen - avatar
0
No problem :)
17th Aug 2018, 2:10 PM
Just A Rather Ridiculously Long Username