Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: JavaScript Programmer's Reference
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: JavaScript Programmer's Reference
This is the forum to discuss the Wrox book JavaScript Programmer's Reference by Alexei White ISBN: 978-0-470-34472-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: JavaScript Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 8th, 2010, 07:19 PM
Registered User
 
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is the parenthesees necessary?

I'm on page 121, simulating private methods, JavaScript, Programmer's Reference, and I was just wondering if the parentheses on line 7 before the function is imperative. Is it just for illustrative purposes? I'm just curious because the code runs both ways, with and without the parentheses.

I'm new to this, but I'm grasping on to the concepts pretty fast, but just so I completely understand the style and not get lost, I was just curious about this one thing.

Thank you.
Reply With Quote
  #2 (permalink)  
Old January 10th, 2010, 11:51 AM
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

That's a fairly technical question about what's really going on inside Javascript, so I'm not sure. But when in doubt I do exactly what you did. Test it.

Based on the results, a good working answer is that they're not required. ;)
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off



All times are GMT -4. The time now is 08:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.