I really didn't expect any output. It was doing fine until I used new.
Without new it returns a number object. But when I tried to use new and
logged it on the console, there I saw this output. Couldn't understand
whether its a number or its an object.

-Regards
*Amit Agarwal <http:///www.amitagrwal.com>*
+91-779-822-8765



On Thu, Jan 13, 2011 at 10:34 PM, Peter van der Zee <[email protected]>wrote:

> On Thu, Jan 13, 2011 at 5:50 PM, Amit Agarwal <[email protected]> wrote:
>
>> Hi,
>>
>> I tried using new with number primitive wrapper constructor. It gave a
>> strange result.
>>
>> var numObj = new Number(2);
>>
>> *numObj = 2 {}*
>>
>> Any guesses what is this?
>>
>
> The output doesn't really make sense (to me) in a js context.
>
> Did you mean that numObj now contains an object rather than a number? What
> did you expect would happen?
>
> - peter
>
> --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]<jsmentors%[email protected]>
>

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to