Wednesday, October 15, 2025
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
32361 POSTS0 COMMENTS
Milvus
88 POSTS0 COMMENTS
Nango Kala
6728 POSTS0 COMMENTS
Nicole Veronica
11892 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11952 POSTS0 COMMENTS
Shaida Kate Naidoo
6851 POSTS0 COMMENTS
Ted Musemwa
7113 POSTS0 COMMENTS
Thapelo Manthata
6805 POSTS0 COMMENTS
Umr Jansen
6801 POSTS0 COMMENTS