declaration expected in else if statement javascript code example
Example: 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);
}