This defines a method, get()
, on the object $
. The method, when called, simply calls a function, value()
. It's a so-called arrow function - a short-form syntax for declaring functions that are bound to the current scope.
This returns the value of $
from the current scope. It's impossible to say from what you've posted what the value of $
is.
((win, doc, name) => { ... }
This is incomplete, and is currently a parse error. It too uses arrow syntax to declare a function. Judging by the opening bracket, it may be the start of an IIFE, or immediately-invoked function expression. The full form would be:
((win, doc, name) => { ... })(/* args here */)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…