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

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -