Wrox Programmer Forums
|
BOOK: Professional JavaScript for Web Developers 2nd edition ISBN: 9780470227800
This is the forum to discuss the Wrox book Professional JavaScript for Web Developers, 2nd Edition by Nicholas C Zakas; ISBN: 9780470227800
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional JavaScript for Web Developers 2nd edition ISBN: 9780470227800 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 29th, 2010, 11:38 AM
Registered User
 
Join Date: Oct 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Number conversions - has an omission P35

In the final bullet point on P 35 you state 'if the string contains anything other than these previous formats, it is converted to NaN'

Well what about negative numbers? So "-35" wouldn't return NaN would it?
 
Old October 30th, 2010, 01:30 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

Negative numbers are identical to their positive counterparts. NaN is literally for things that aren't a number.
__________________
-------------------------

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.
 
Old October 30th, 2010, 06:42 AM
Registered User
 
Join Date: Oct 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by chroniclemaster1 View Post
Negative numbers are identical to their positive counterparts. NaN is literally for things that aren't a number.
You aren't telling me anything I don't already know here! I was pointing out to the author, the omission of negative numbers in his list of bullet points made the final 'catch-all' statement invalid.
 
Old November 1st, 2010, 06:11 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Yes, you are correct, the wording should be changed. I'll make sure this gets updated.
__________________
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL conversions - chapter 7 gorillapoop BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 2 February 15th, 2011 11:02 AM
Error, Strict On disallows implicit conversions f vbGaz VB.NET 2002/2003 Basics 0 January 3rd, 2005 04:27 AM
C# - Decimal to Single type Conversions ubayeed C# 1 December 22nd, 2004 08:48 PM
Type Conversions nikotromus Access VBA 2 October 7th, 2004 05:30 PM
Time conversions from 24hr to am/pm Blaise Classic ASP Basics 2 July 14th, 2003 09:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.