Error message

Yesterday I strived with a missing comma in javascript:

x = [{1:2},
{2:3}
{3:4},
{4:5}
];

The error was:

SyntaxError: missing ] after element list

While for the same(!) python code except for the semicolon the error was:

  File "filename.py", line 4
    {3:4},
    ^
SyntaxError: invalid syntax
Advertisements

One thought on “Error message

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s