On 9 February 2015 at 11:17, Si Robertson <[email protected]> wrote:
> // JavaScript > let a = 0 // int? > let b = 0.0 > let c = 1 // int? > let d = 1.0 > let e = 1.2 > > My question is, does V8 consider a and c to be integers or is the > explicit use integer related (bitwise) operators required to coerce doubles > to integers? > Internally, V8 usually represents any constant as an integer that can be converted into an integer without loss of precision. That includes even b and d above. Externally, of course, JS does not have integers, and you shouldn't need to care either way. /Andreas -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
