control flow javascript w3schools code example Example: javascript how to raise the error Click to copyif (..condition..) { throw 'Error message'; }