Answer the question
In order to leave comments, you need to log in
How to add a key/value to an object?
I will parse html . In html there are ul>li lists, I will add the key is the text ul , and the value is li , but I can’t figure out how to add them to the object.
What is the cat method that creates a new key and value?
// a piece of code does not parse html , but will give an understanding of how to do it . Thank you!
var obj = {};
var mass = ['Number1', 'Number2'];
for(var i=0; mass.length; i++){
}
// Как сделать такой объект
obj = {
Number1 = '0';
Number2 = '1'
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question