JavaScript中的Assigment运算符。 [英] Assigment operator in JavaScript.

查看:78
本文介绍了JavaScript中的Assigment运算符。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看看我的代码片段....

Have a look at my code snippet ....

展开 | 选择 | Wrap | 行号

推荐答案

你去过这里足够长,知道Java!= Javascript。


< Moved>
You have been here long enough to know that Java != Javascript.

<Moved>



你在这里已经知道Java!= Javascript。


< Moved>
You have been here long enough to know that Java != Javascript.

<Moved>



对不起,我错误了....: - )

Sorry here i mistyped.... :-)


yes ...对象和数组通过引用传递(像boolean,字符串,数字甚至函数这样的简单类型通过值传递... ...并且引用指向内存地址...所有都被绑定到''base-parent''窗口(不是真的但这是你当前的运行时环境,如果你喜欢这样看),所以如果你存储/传递对这个窗口的引用,那么垃圾收集器只知道你有一个引用它并忽略该引用而不是抛出它;)


亲切的问候
yes ... objects and arrays are passed by reference (simple types like boolean, strings, numbers and even functions are passed by value) ... and the reference points to the memory address ... all is ''bound'' to the ''base-parent'' window (not really but that is your current runtime environment if you like to see it that way), so if you store/pass a reference to something to this window then the garbage collector just knows that you have a reference to it and ignores that reference instead of throwing it ;)

kind regards


这篇关于JavaScript中的Assigment运算符。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆