Jump to content

JS function()


eTianbun

Recommended Posts

I'm trying to understand Js function() more, but am kinda confuse at this point!Q: Is't the 'function' that actually execute the statement, or it is the 'browser'?EX:

function a() {alert()}/*call*/a()

Is it that the browser passes a() to the function to execute? Or the a() is actually a command for the browser to execute the function? Plz guys, i need help on 'this'.

Link to comment
Share on other sites

The first syntax:

function x() {  // Some code}

Defines what a function is supposed to do.The second syntax:

x();

Tells the environment to run that function.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...