How about writing a custom function? I think something like this would work and would create a nice mini-optimisation to use objects as you're suggesting!
function mapObject(obj, callback) {
for (let [idx, val] in obj.entries()) {
callback(val, idx);
}
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
How about writing a custom function? I think something like this would work and would create a nice mini-optimisation to use objects as you're suggesting!
function mapObject(obj, callback) {
for (let [idx, val] in obj.entries()) {
callback(val, idx);
}
}