File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 105

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: 63844

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] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385

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.


I agree. Here's the link:
subject: Basic Javascript question
jQuery in Action, 3rd edition