How Would I Create An Object In JavaScript? -
To be more specific, I essentially need to create an object where I can store and read prices .
I am a part of a knot in JS, so I am sorry if I have limited understanding. I give an example.
var usrobj = mainobj.id (userID Here); Var usrplays = usrobj.plays; Content of that kind
But, I would also like to write play values. any idea?? (I do not know a crap of Javascript, mostly compared to you)
Object actually You are awesome in JS because they are very simple You can create an object like:
var usrobj = {}; This is what you need after you can easily add the key to it:
userobj.plays = somevalue; And read it easily since:
console.log (userobj.plays); Hope that helps.
Comments
Post a Comment