Created
October 24, 2015 09:24
-
-
Save xto3na/53767592a9e843fa16e9 to your computer and use it in GitHub Desktop.
Возврат функции в JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myFunc = function() { | |
return function(){ | |
console.log("Hi!"); | |
} | |
}; | |
//Вызов | |
myFunc()(); //Выведет в консоль "Hi!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment