declaration or statement expected code example
Example 1: error: expected declaration or statement at end of input
/*Normally that error occurs when a } was missed somewhere in the code*/
Example 2: else js declaration or statement expected
// This example shows that you need to wrap your line in parenthesis.
// This is the syntax for destructuring after declaration as shown in the example here:
let x0, x1, y0, y1;
if(this.props.viewport) {
({x0, x1, y0, y1} = this.props.viewport);
}