CS-Notes/docs/_style/prism-master/tests/languages/javascript/supposed-function_feature.test
2018-12-19 14:09:39 +08:00

39 lines
781 B
Plaintext

foo.apply(thisArg, args);
bar.call(...args);
fooBar.bind(thisArg);
----------------------------------------------------
[
["function", "foo"],
["punctuation", "."],
["function", "apply"],
["punctuation", "("],
"thisArg",
["punctuation", ","],
" args",
["punctuation", ")"],
["punctuation", ";"],
["function", "bar"],
["punctuation", "."],
["function", "call"],
["punctuation", "("],
["operator", "..."],
"args",
["punctuation", ")"],
["punctuation", ";"],
["function", "fooBar"],
["punctuation", "."],
["function", "bind"],
["punctuation", "("],
"thisArg",
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for supposed function variables based on standard function invocations or modifications.