Skip to content
Advertisement

JS remove array variable names

I’m new in JS… can someone help me to change this:

JavaScript

to this:

JavaScript

Advertisement

Answer

You can map your array using Object.values() as a callback:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement