Why can you programmatically (in a loop) add a property to an array element, while the given element is a string, like this:
arr.map((obj, i) => { obj.active = true }) Do you have to write such a property with your hands (or can you?)
Why can you programmatically (in a loop) add a property to an array element, while the given element is a string, like this:
arr.map((obj, i) => { obj.active = true }) Do you have to write such a property with your hands (or can you?)
Source: https://ru.stackoverflow.com/questions/574854/
All Articles
new String. With primitives - does not work. - Grundy