iamdanmccarthy / newUltimateRumble

0 stars 0 forks source link

Passing Fighters From Dropdown box into ultimateRumble function #1

Open michaelwiltfong-okta opened 1 year ago

michaelwiltfong-okta commented 1 year ago

Looks like you're storing the names of the dinosaurs as the value attribute of the select tag.

Looking at MDN's docs around the Option class you can pass in a second parameter that will set value to a specific value.

Maybe you can use JSON.parse()link here to store the object in the HTML and then use JSON.parse() to retrieve it here

michaelwiltfong-okta commented 1 year ago

Sorry you'll want to use JSON.Stringify() to store the data and then JSON.parse() to retrieve it. JSON.Stringify()