I have seen some functions inside (
)
, and then I did a little research and found it was called closures. But I'm not really sure if that's what it is or closures are Classes.
What I mean is the following:
<script>(function e() { console.log("hello world"); })</script>
Why is the function e()
inside()
, what does that means?
Is it anyhow related to the following code?
function() C {
e = function() { console.log("hello world"); };
}