when to use catch, throw, error in javascript code example Example: js throw error throw new Error('Whoops!')