[rosedu-general] Veriga lipsa intre consola, Batman si JavaScript
Andrei Picus
office.nightcrawler at gmail.com
Thu Oct 11 22:32:40 EEST 2012
On Thu, Oct 11, 2012 at 10:13 PM, Mihai Bivol <mm.bivol at gmail.com> wrote:
> [] + {} + 3 + "ana"
"[object Object]3ana"
>
[] + {} va da un obiect, care va fi coerced la stringul "[object Object'],
ceva fi mai apoi concatenat cu 3 (ce va fi coerced) si "ana".
> {} + [] + 3 + "ana"
> "3ana"
>
{} + [] = 0. +3 = 3. + "ana" = "3ana". For some reason, {} + [] != (a={}+[])
dafuq?
>
> Mihai
JavaScript...
--
Andrei Picus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rosedu.org/pipermail/rosedu-general/attachments/20121011/05374a49/attachment.html>
More information about the rosedu-general
mailing list