Skip to content
Advertisement

Why my javascript looping return error missing ‘of ‘ after for

JavaScript

I have code like that but I see an error on the console

SyntaxError: missing ‘of’ after for

Does anyone know why? I did search on Google, but nothing can tell me why.

Advertisement

Answer

Obviously, You will get incorrect syntax. Seems you want to create an array so use Array.map()

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