javascript simulate throw network error code example Example: js throw error throw new Error('Whoops!')