Comments (1)
The primitive types (Number, String, etc.) are passed by value, but Objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).
原始类型(数字类、字符串类等)是值传递,但是对象类型不确定。因为它们好像既可以值传递(一个变量持有一个对象,事实上持有这个对象的引用),又可以引用传递(持有这个对象的变量)。
Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?
虽然它不会绝对的左右结果,但是我想明白参数传递的真正途径。JS标准里有没有对此定义如何处理?
from blog.
Related Issues (20)
- 源码学习系列之Lodash-Array系列-compact-003
- 代码优化系列之斐波纳契数列
- 代码优化系列之格式化日期
- 代码优化系列之生成一个指定长度的随机字符串 HOT 4
- new Boolean(1)得到一个实例对象,值为true,键是什么?
- new Date()的对象值是个字符串,对象本身是什么,键是什么?
- nationJson
- less特殊符号处理
- TypeScript系列之可选与默认参数
- TypeScript系列之类的结构及声明
- TypeScript系列之属性和方法的定义
- TypeScript系列之静态属性
- TypeScript系列之构造函数
- TypeScript系列之类的实例化
- TypeScript系列之继承
- TypeScript系列之接口声明
- JavaScript内存释放问题
- 源码学习系列之Lodash-Array系列-slice-001
- 源码学习系列之Lodash-Array系列-chunk-002
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.