Talking about js statements similar to (function () {}). call ()
This article mainly introduces the js statements similar to (function () {}). call (). For more information, see
Study the automatic login process of Sina Weibo, which involves its encryption algorithm script, which contains the following code:
(Function () {...}). call (name)
The red one .... is the internal implementation of the function. name is the name of an object. this type of js has never been seen before (forgive me for having little knowledge about js ). then Baidu has the following meanings:
The purpose of. call (name) is to use name as this in the domain where the previous function is located. That is to say, this in the function is equivalent to referencing name.
The actual meaning of this Code can be considered as: the specific implementation of the function modifies the variable name, or, more simply, the implementation of the function is the specific implementation of the variable name, in a sense, it is equivalent:
Var name = function (){...}
The above is all the content of this article. I hope you will like it.