Saturday, February 7, 2026
HomeLanguagesJavascriptJavaScript SyntaxError – Missing } after property list

JavaScript SyntaxError – Missing } after property list

This JavaScript exception missing } after property list occurs if there is a missing comma, or curly bracket in the object initializer syntax.

Message:

SyntaxError: Expected '}' (Edge)
SyntaxError: missing } after property list (Firefox)

Error Type:

SyntaxError

Cause of Error: Somewhere in the script, there is a missing curly bracket or missing comma in the object initializer syntax.

Example 1: In this example, there is a missing comma, So the error has occurred.

Javascript




let GFG_Obj = {
    prop1: 1,
    // Missing "," here
    prop2: { prop21: 2 }
prop3: 3
};
console.log(GFG_Obj);


Output(In console):

SyntaxError: Expected '}'

Example 2: In this example, there is a missing curly bracket, So the error has occurred.

Javascript




let GFG_Obj = {
    prop1: 1,
    // Missing "}" here
    prop2: {
        prop21: 2,
        prop3: 3
    };
console.log(GFG_Obj);


Output(In console): 

SyntaxError: Expected '}'
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
RELATED ARTICLES

Most Popular

Dominic
32491 POSTS0 COMMENTS
Milvus
126 POSTS0 COMMENTS
Nango Kala
6863 POSTS0 COMMENTS
Nicole Veronica
11987 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12077 POSTS0 COMMENTS
Shaida Kate Naidoo
6996 POSTS0 COMMENTS
Ted Musemwa
7238 POSTS0 COMMENTS
Thapelo Manthata
6947 POSTS0 COMMENTS
Umr Jansen
6934 POSTS0 COMMENTS