+ 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?
6 Respostas
+ 2
Here's one way
https://code.sololearn.com/W1yKfMJZiw9G#js
+ 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
+ 2
Just A Rather Ridiculously Long Username already answered that question
+ 1
Yup is that possible Yahiko
+ 1
0
No problem :)