else js declaration or statement expected

JavaScript
// 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);
}

Source

Also in JavaScript: