This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes Basic Javascript question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Basic Javascript question" Watch "Basic Javascript question" New topic

Basic Javascript question

Pavan Kumar Dittakavi
Ranch Hand

Joined: Feb 12, 2011
Posts: 104

Hi All,

Can someone please tell me what the following statments mean? Im totally confused

I know that these are basic js questions. But Im really not able to comprehend these things here. Im very much new to js . Please suggest.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 61092

1. No the function is not called by this statement. Functions are first class objects in JavaScript so references to them can be passed around. Here, the actionCall property is being assigned as a reference to the function.

2. tbody sounds like it's a reference to a tbody element, so this is simply traversing the DOM tree. (Would be lots and lots easier using jQuery.)

3. Yes.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376

Start with a tbody element
first child of the tbody would be the first tr element
last child of the tr would be the last cell [td or th]of the table
first child of the cell would be the first element in it.


It is sorta covered in the JavaRanch Style Guide.
subject: Basic Javascript question