[Javascript] help with test program.

Matt Warden mwarden at gmail.com
Fri May 9 22:12:20 CDT 2008


On Fri, May 9, 2008 at 10:35 PM, brian mahoney <wobbly at optonline.net> wrote:
> Hi,
>
> I'm pretty new to JavaScript and just purchased "JavaScript: The Good
> Parts".
>
> Here is the code from the book.  I also tried copying it from the
> online source and have the same problem:
>
> // Create myObject. It has a value and an increment
> // method. The increment method takes an optional
> // parameter. If the argument is not a number, then 1
> // is used as the default.
>
> var myObject = {
>     value: 0;

With this notation, you need to use a comma, not a semi-colon.

-- 
Matt Warden
Cincinnati, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the Javascript mailing list