closure for var in javascript

on 2016-10-24

clojure

{% highlight shell %} (function (a) { return function () { console.log(a); } })("arg"); {% endhighlight %}

bind

{% highlight shell %} (function (a) { console.log(a); }).bind("arg"); {% endhighlight %}