
[英]Where does Javascript allocate memory for the result of a function call? Stack or heap?
[英]Where do function definitions live? In the stack or in the heap?
当我们定义一个 function 时,就 memory 分区而言,它在哪里 go? 像原始数据类型一样在堆栈上? 还是像对象一样堆在堆上?
函数是对象。 因此,函数的标识符在堆栈中,而函数的值存储在堆中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.