how to define simple user error message in javascript code example Example: javascript how to raise the error if (..condition..) { throw 'Error message'; }