new error() const x = Error('I was created using a function call!'); console.log(x); const y = new Error('I was constructed via the "new" keyword!'); console.log(y); 相关文章: