First, I am a beginner of javascript. Please understand asking this simple question.. (looks simple)
I was making a membership related webpage and encountered an error.. I was learned that to access the element of an object, I can use '.'(dot) so I coded like, It was a bit long object(json type contents) but.. to sum up,
dict1 = {'a':1, 'b':2, 'c':3};
dict2 = {1:'a', 2:'b', 3:'c'}
dict1.a result: 1
dict2.1 result: Uncaught SyntaxError: Unexpected number
so the point is, Someone may think, "if you can see the elements, why would you access the element by '.'(dot). if you already know it can cause the error." but the data is user input and users can input any data as they wish.
Javascript provides '.'(dot) operator for Object but not working for number Element??
or do I use the dot in wrong way?