Java Script vs nodejs

La differenza tra Javascript e node js.

Eseguendo le stesse assegnazioni nei due linguaggi, si ottengono risultati differenti.


####################################
## Javascript dentro nel browser
####################################
[] + []
""
{} + []
0
[] + {}
"[object Object]"
{} + {}
NaN


####################################
## nodejs dentro nel terminale
####################################
> [] + []
''
> {} + []
0
> [] + {}
'[object Object]'
> {} + {}
'[object Object][object Object]'


Leave a Reply

Your email address will not be published. Required fields are marked *