Thank you, that helps! On Tue, Jun 8, 2010 at 3:03 PM, Aaron Boodman <[email protected]> wrote:
> In JavaScript, you would use the valueOf() method: new > Boolean(false).valueOf() => false. You can do that from v8 too, by > casting your value to an Object, then finding its "valueOf" method, > then calling it. It's a little bit laborious but I can't see any other > way. > > On Tue, Jun 8, 2010 at 2:54 PM, vlad <[email protected]> wrote: > > Thank you Aaron, but how to get to the actual value in v8? > > > > On Jun 8, 2:46 pm, Aaron Boodman <[email protected]> wrote: > >> On Tue, Jun 8, 2010 at 11:13 AM, Aaron Boodman <[email protected]> wrote: > >> > On Tue, Jun 8, 2010 at 11:09 AM, vlad <[email protected]> wrote: > >> >> "any = new Boolean(false);" > >> > >> > Not a bug. This is a classic javascript thing. Try this in JavaScript > >> > (no v8 required): > >> > >> > var foo = new Boolean(false); > >> > alert(foo == true); // says "false" > >> > >> > The problem is that: > >> > >> > alert(typeof foo); // says "object", not "boolean" > >> > >> > - a > > > > -- > > v8-users mailing list > > [email protected] > > http://groups.google.com/group/v8-users > > > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
