You Don't Know JS: Types & Grammar
Publisher: O'Reilly Media
Final Release Date: January 2015
Pages: 198

No matter how much experience you have with JavaScript, odds are you don’t fully understand the language. As part of the "You Don’t Know JS" series, this compact guide explores JavaScript types in greater depth than previous treatments by looking at type coercion problems, demonstrating why types work, and showing you how to take advantage of these features.

Like other books in this series, You Don’t Know JS: Types & Grammar dives into trickier parts of the language that many JavaScript programmers simply avoid or assume don’t exist (like types). Armed with this knowledge, you can achieve true JavaScript mastery.

With this book you will:

  • Get acquainted with JavaScript’s seven types: null, undefined, boolean, number, string, object, and symbol
  • Understand why JavaSript’s unique array, string, and number characteristics may delight or confound you
  • Learn how natives provide object wrappers around primitive values
  • Dive into the coercion controversy—and learn why this feature is useful in many cases
  • Explore various nuances in JavaScript syntax, involving statements, expressions, and other features
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyYou Don't Know JS: Types & Grammar
 
5.0

(based on 2 reviews)

Ratings Distribution

  • 5 Stars

     

    (2)

  • 4 Stars

     

    (0)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

Reviewed by 2 customers

Sort by

Displaying reviews 1-2

Back to top

(1 of 1 customers found this review helpful)

 
5.0

Why use coercion to write better Javascript code

By thegayngler

from New York, NY

About Me Developer

Verified Reviewer

Pros

  • Accurate
  • Extremely Useful
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Expert
    • Intermediate
    • Professional

    Comments about oreilly You Don't Know JS: Types & Grammar:

    After reading the first two books in the You Don't Know Javascript series I was not exactly enthused about this topic based on the title 'Types and Grammar'. I thought to myself what could the author possibly be talking about with such a non-descript arguably downright boring title. I think the title should be called 'Why use coercion to write better Javascript code' or simply 'Coercion'.

    After having read this book, I was pleasantly surprised by how much of the information I could use immediately. This book aims to teach you types in javascript and how they interact with each other. I think overall it succeeded in its goal.

    The first few chapters introduces the different types of values in javascript. We also learn that variables have no types in an of themselves but that it's the values that have types.

    The author sprinkles in lessons about the idiosyncrasies of Javascript very early on in the book rather than waiting and throwing all of them at us at once in one single chapter later on in the book. This makes the Javascript idiosyncrasies easier to digest and reason about when they are brought up. It also gives the author a chance to explain why many of the behaviors of Javascript that are considered to be weird actually make sense upon further inspection. I think this is one of my favorite things about this book.

    We learn about the different "operand selector operators" (otherwise known as "logical operators") and how Javascript has given these operators additional functionality that many in the community use even while complaining about their use.

    This leads me to the main discussion in this book and that's the use of coercion to make our code more readable and easier to reason about. Coercion in many cases is unfairly maligned by the developer community and rather than learning how to use it to write better code we complain about it without having throughly considered the benefits of coercion.

    All in all this book was a wonderful read and I would highly recommend it to anyone as I think there are things in this book that can be put to use immediately in our code.

    (2 of 2 customers found this review helpful)

     
    5.0

    Just brilliant in every regard

    By Simon Welker

    from Nuremberg

    About Me Developer

    Verified Reviewer

    Pros

    • Accurate
    • Concise
    • Easy to understand
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Intermediate

      Comments about oreilly You Don't Know JS: Types & Grammar:

      I don't think I've ever read a book this good on a programming topic. Everything was explained well, to the point, and extremely interesting. This, in my opinion, tops the first two parts of the series even though it's an early release, as I didn't feel like having to read some paragraphs twice (which I expect to often happen with in-depth discussions of unknown/unexpected technical issues). I was left with easily understanding many 'wtf' examples on JS that float around the internet outside of the examples given in the book, and getting a lot of ideas on how to make my code look nicer, and work better.

      Displaying reviews 1-2

      Back to top

       
      Buy 2 Get 1 Free Free Shipping Guarantee
      Buying Options
      Immediate Access - Go Digital what's this?
      Ebook: $18.99
      Formats:  DAISY, ePub, Mobi, PDF
      Print & Ebook: $24.19
      Print: $21.99