Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

javascript

Name: Anonymous 2010-06-20 12:23

how is this supposed to work?

(function()
    {
    var derp = function()
    {
    some shit
    }
some other shit
}

i dont understand (function){}
shouldn't it be like this function funcname(){} ?

Name: Anonymous 2010-06-20 12:34

>>3
forget about semicolons and other shit. i just stripped the code down to the relevant stuff.
im curious about how he creates the function. i've always thought you have to give your function a name like
function nameDerp(){stuff...}

i made a failure in the above example, correct one:

(function() {
var inArray = function() {
    stuff...
}
stuff...
})();

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List