update Hi guys, Have a look at following code
let bigint = Object(1n) console.log(1n.__proto__===bigint.__proto__) console.log(typeof 1n) console.log(typeof bigint) the output is true // A bigint // B object // C why while at A is true but at B is bigint (not the expected object)? or why at C is not bigint? *DELETED* *If when 1n.__proto__ is evaluated, the 1n is implicitly converted to an Object, why the following code does not work?1.__proto__ // SyntaxError: Invalid or unexpected token* Many thanks! 在2023年7月14日星期五 UTC+8 15:25:14<Shang Yu> 写道: > Hi guys, > Have a look at following code > > let bigint = Object(1n) > console.log(1n.__proto__===bigint.__proto__) > console.log(typeof 1n) > console.log(typeof bigint) > > the output is > true // A > bigint // B > object // C > why while at A is true but at B is bigint (not the expected object)? or > why at C is not bigint? > If when 1n.__proto__ is evaluated, the 1n is implicitly converted to an > Object, why the following code does not work? > 1.__proto__ // SyntaxError: Invalid or unexpected token > Many thanks! > > -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/d35f6905-fc03-4ae4-bd9f-a01e06e53a3cn%40googlegroups.com.