DEV Community

I am getting an error while using express and axios

Sanket N Jain on July 02, 2020

I am using API to display movie search using express and axios when the user searches for a particular movie and I got some error after running the...
Collapse
 
thughes24 profile image
Tom Hughes

It looks like the error is from the second bracket after the function definition inside the for loop.

So;
forEach(function(movie)) { ... }

Would become;
forEach(function(movie) { ... })

Collapse
 
sanketnjain5 profile image
Sanket N Jain

Thank you it was such a silly mistake and I couldn't find it!!

Collapse
 
sfiquet profile image
Sylvie Fiquet

It looks like the closing bracket ) is in the wrong place, it should be after the closing curly bracket } I think, to close forEach.

Collapse
 
sanketnjain5 profile image
Sanket N Jain

Thank you it was such a silly mistake and I couldn't find it!!