@fredmvDec 03.2003 — #Parentheses are used to call and define functions, for example, to define a function the following syntax is used:function foo() { //... }Then, to call that function, you'd do this:foo();The brackets are used to create arrays or reference elements within arrays. You could, for example, create an array like this:var bar = ['foo', 'bar'];Then reference values in it like this:foo[0]; foo[1];For your last question, it's not exactly possible to make a function that looks exactly like that, but it's possible to create one that acts similar to it. You can create something called an [i]annonymous function[/i] (a function in which has no name) and store it within and array cell. Here's an example:var a = new Array(); a[0] = function() { return "Hello, World!"; } a[1] = a[0](); alert(a[1]);That would then alert the string "Hello, World!" since the first element of the array defines an annoymous function that returns the string "Hello, World!", then, the second element of the array calls the function which results in the return value placed inside of it.
@fredmvDec 03.2003 — #It doesn't. You use [font=courier]document.getElementById[/font] like this:document.getElementById("foo");Where [i]foo[/i] is the [font=courier]id[/font] of the HTMLElement object you are referring to.