0

What's wrong with my code ?

I created a simple movie database in js and I ran it in a code editor and it worked as expected but here on Sololearn in the code playground, I got a referenceerror and it says there's something wrong at line 48 Also when I choose to log the objects and its contents,I get [object object] as output https://sololearn.com/compiler-playground/Wvo6BttDcpyd/?ref=app

9th Jan 2025, 8:09 AM
DashFR
DashFR - avatar
2 Réponses
+ 1
Look at lines 9 and 36 here: https://sololearn.com/compiler-playground/Wavg7zh3wBAH/?ref=app We need to make sure that menu is defined. Mind that prompt() returns a string. How objects are printed console depends on the browser/ environment. I'd suggest converting it to a string.
9th Jan 2025, 10:51 AM
Lisa
Lisa - avatar
+ 1
Thanks i'll do so
9th Jan 2025, 11:33 AM
DashFR
DashFR - avatar