how to throw error with error code with javascript code example Example: js throw error throw new Error('Whoops!')