how to throw an error from a function js code example Example: js throw error throw new Error('Whoops!')