2021年5月6日星期四

Different output in Node and browser

const person = { name: 'Bob' }  Object.defineProperty(person, 'age', { value: 21 })  console.log(person)  

this code result in different result in chrome print {name: "Bob", age: 21}
otherwise in Node (v15.6.0), print { name: 'Bob' } what cause that?

https://stackoverflow.com/questions/67428510/different-output-in-node-and-browser May 07, 2021 at 11:06AM

没有评论:

发表评论