TIL brackets breaking elements in JavaScript
POSTED ON:
TAGS: javascript linter
I always forget about this edge-case:
// returns the object
return {
hello : "world"
}
// undefined, because of the
return
{
hello : "world"
}
Because of automatic semicolon insertion.
The "automatic semicolon insertion" it does is an error correction process.
:grimace:
Via Potential_Ant_9890 on Reddit
Related TILs
Tagged: javascript