- Aug 2016
-
confluence.atlassian.com confluence.atlassian.com
-
Global variables can be accessed by using ${bamboo.globalVarName}.
但是我不想这么获得啊
-
- Jul 2016
-
davidshariff.com davidshariff.com
-
i: 22
Q: i和arguments[0]是相互独立的吗?如果我修改arguments[0], i会保持原来的值么?
A: 下面Q&A部分有解释。i和arguments[0]应该reference to each other。
但是究竟什么是reference to each other? 如果是object,我可以理解它们都reference到同一个object。但是如果是primitive呢?
-
-
javascriptissexy.com javascriptissexy.com
-
Indeed, any object that uses the Fruit () constructor will inherit all the Fruit.prototype properties and methods and all the properties and methods from the Fruit’s prototype, which is Plant.prototype.
How this inheritance is implemented? Does it suggest that Fruit's prototype will hold a reference of Plant's prototye?
Q: Why Fruit's prototype is Plant.prototype instead of the Plant object? A: Because aBanana.showNameAndColor().
If Fruit.prototype is Plant.prototype, then shouldn't every object's prototype is just a reference of the Object.prototype?
-
- Jun 2016
-
www.bennadel.com www.bennadel.com
-
But, this code looks a little bit junky, right?
就是啊!!
-
init: function( name ){
如果要这么绕圈的话,为啥不直接用new呢?
-
-
javascriptweblog.wordpress.com javascriptweblog.wordpress.com
-
The this keyword evaluates to the value of the ThisBinding of the current execution context.
这句话在暗示this其实和ThisBinding的值是不一样的?
那么在Execution Context里面存的究竟是this还是ThiBinding呢?
-
this value is taken from the this value of the calling execution context
这个其实更好理解。
-
a.b(); //window
这个很tricky啊
如果在b里面把this打印出来,那么this应该为a; 但是这个例子打印的是c()里面的this,而c()是被baseless地call的。
-
foo
foo() 在global定义和在function里面定义有区别的吗?
-
Baseless
啥叫作baseless function call 呀?
-
There are three types of execution context: global, function and evaluation
evaluation 这种Exectution Context还没有研究过。。。
-
-
dmitryfrank.com dmitryfrank.com
-
scope object
不要自创名词好不好?!
作者这里的Scope Object听起来像是VO和Scope chain的混合体。当然,作者可以说是lexical environments,但不能说是LexicalEnvironment!!! 改词是reserved的!!
-
-
speakingjs.com speakingjs.com
-
partial function application
这个
bind
的用法很有意思,在很多地方都见过。我理解它的优势是可以修改函数的args列表,产生新函数。 -
function declarations have two advantages over function expressions
以我目前的知识,除了call back,还没想到很好的function expression的例子……
-
constructor Function()
下文不建议使用
Function()
-
The Three Roles of Functions in JavaScript
感觉这三个role的主要区别是this的值
- Nonmethod function
this
指向Global Object- Constructor
this
指向新建的Object- Method
this
指向method所属的Object
Tags
Annotators
URL
-
-
speakingjs.com speakingjs.com
-
The two cornerstones of Ajax are loading content asynchronously in the background (via XMLHttpRequest) and dynamically updating the current page with the results (via dynamic HTML).
终于有点明白AJAX是干什么的了
-
-
speakingjs.com speakingjs.com
-
JavaScript does not have integers
这对我们平时的使用有啥影响么?
-
Influences
学好多门语言才能精通一门……
-
It’s dynamically typed
无法从function的signature看出使用function的方法。这暗示说JS的文档很重要咯?
-
Prototypes
我目前还不清楚Prototype有什么benefits。
-
arrays in JavaScript are too flexible: they are not indexed sequences of elements, but maps from numbers to elements.
有意思 居然这么写……
-
JavaScript is always deployed as source code and compiled by JavaScript engines.
突然意识到,JS的source code deployment方式也许是对JS engine不统一的一种妥协。
-
It fails silently
作为早期只在Browser里面跑的语言,JS的确应该fail silently。但是,随着NodeJS等server端JS兴起,这种特点就不合适了。
-
functional programming (first-class functions, closures, partial application via bind(), built-in map() and reduce() for arrays, etc.)
很全面的Functional Programming特点的总结
-
And you can directly create objects, without creating an object factory (e.g., a class) first
这个很有特点,直接使用{...}来建立新Object
Tags
Annotators
URL
-