Okay, so the only way to explain this is with an example. In javascript you can do something such as:
if(condition) {
}
The { and } are used to identify a code block. But in some cases such as this:
window.onload = function() {
}
You need the function() included. Why can't it just be:
window.onload {
}
Why the need for function() ? Also, I thought functions all have a name associated with them, and when that name is called the function runs, but why in this case is there a function with no associated name?