This documentation is archived and is not being maintained.

JS1008: Expected '{'

The left brace that marks the beginning of the function body, class member block, interface member block, or enumeration block is missing. Code that comprises the body of a function, even if it is a single line, must be contained within left and right braces.

Notice that the use of braces in loops is less strict than for function bodies and member blocks.

To correct this error

  • Add the left brace that marks the beginning of the function body.

Show: