Comments (4)
Not sure exactly what you mean by "native js functions", but have you checked out this chapter: https://github.com/getify/You-Dont-Know-JS/blob/master/this%20%26%20object%20prototypes/ch3.md The first several sections cover the native primitives and built-in object constructors, which I think might be what you're talking about.
Control flows: Umm, I'm not sure if there will be a title that covers these or not. There's a planned "Grammar & Types" title, which might be able to cover control structures from the perspective of the grammar around them. But it's not probably a direct title topic, at least under the current plan.
Can you elaborate on what sort of coverage you'd think would be appropriate? What sorts of things about JS control structures are people typically confused about in JS? Perhaps I'm missing an area of confusion that a title (or at least chapter) would be really useful for?
from you-dont-know-js.
Native JS Functions
I was thinking something like Crockfords string/number function guide at the end of his book 'JavaScript: The Good Parts'. It it similar to the w3c pages: 'http://www.w3schools.com/jsref/jsref_obj_string.asp'. The reason I mention it is that there are a few 'gotchas' with some of the native JavaScript functions. For example:
- the second argument to parseInt
- dangers with setInterval and timing functions generally (http://javascript.info/tutorial/settimeout-setinterval, http://ejohn.org/blog/how-javascript-timers-work/)
- string.replace (only replaces the first match, not all matches)
- forin loops and property lookups (perhaps better covered in control flows)
- Others
Control Flows
I think we might be talking about the same thing with your title 'grammar and types'. I was thinking about defining if
, else
, ternary operators var result = value ? true : false;
, switch statements, for loop variations, forin loops, while loops and new ecmascript 5 array methods (forEach, every, some, map, filter, reduce, reduceRight) as well as other control statements I have may have omitted.
from you-dont-know-js.
Thanks for the detailed feedback! This is great stuff. :)
For-in loops and property methods are definitely covered in-depth in that chapter 3 I linked above. The other stuff you mention isn't stuff I was necessarily planning on covering, but I can see there's some value there so perhaps it could come in the form of an appendix or something like that. Will definitely keep it in mind.
As for the control-flows stuff, the ES5 Array extras, and other related topics, again I don't know if that's a direct title or just an appendix to another title, or just that each topic is covered in an indirect way throughout the rest of the titles (especially the grammar one). But either way, again I can see some potential value, so I'll keep those topics on the radar and try to find a place they naturally fit.
My goal with these books is not really to teach general programming, or even necessarily to reach a beginner developer audience, but more to go after the seasoned programmer (especially someone who "thinks" they know JS inside and out) and point out the places where their understanding needs more depth, and thus help fill in the holes. To that end, I'm mostly focused on the things that are classically the most misunderstood and the most mis-represented, not just a broad general coverage of programming syntax and concepts.
There are plenty of "JavaScript: The Complete Reference" types of books out there. But those books fail to go into enough depth to really give solid and deep understanding of the most important stuff, and you lose that by going overly broad with all the generic basics.
For instance, I plan to talk in the grammar title about break
and continue
, which seem like basic concepts, but actually most people don't really understand how or why they work, and the proper way to think about them (including labeled blocks!). There'll also be a whole section/chapter about operator precedence, because that's such an under-understood topic. Same with ASI. And we're going to cover stuff like the fact there's actually both a +0
(same as 0
) and a -0
(distinct, but kinda hard to tell) value in the language, why that matters, how you can distinguish, etc.
The common thread: these are all things which don't get properly/deeply covered hardly anywhere else, and they're things which actually lead to holes and shortcomings in understanding, which lead to wrong conclusions and assumptions, which lead to poorer coding.
And it's not officially announced/planned yet, but there will eventually need to be an "ES6" title to cover all the new syntax forms coming to the language, which pretty much no one understands yet except the spec committee members and a few select nerds (I don't even grok a lot of it yet!). It's a whole new language! (well, not really, but hyperbole)
So, I have to be careful to always think about topics in that light, and strike the intended and consistent tone. I don't want to just re-tread the same old stuff every other book has. I need to make sure there are unique and important uncovered parts (hey, I like that as an alternate title: "JavaScript: The Uncovered Parts"!) to focus the content around. :)
Thanks again for your great feedback. Will definitely keep this in mind going forward with the series.
from you-dont-know-js.
You're welcome. Sounds like you are all over it. My question stemmed from a misunderstanding of the projects scope and purpose. I did not think this was totally clear from your README.md
or preface. Perhaps it is worth adding your above words to either the README.md
or the preface:
Goals and Scope
My goal with these books is not really to teach general programming, or even necessarily to reach a beginner developer audience, but more to go after the seasoned programmer (especially someone who "thinks" they know JS inside and out) and point out the places where their understanding needs more depth, and thus help fill in the holes. To that end, I'm mostly focused on the things that are classically the most misunderstood and the most mis-represented, not just a broad general coverage of programming syntax and concepts.
There are plenty of "JavaScript: The Complete Reference" types of books out there. But those books fail to go into enough depth to really give solid and deep understanding of the most important stuff, and you lose that by going overly broad with all the generic basics.
So, I have to be careful to always think about topics in that light, and strike the intended and consistent tone. I don't want to just re-tread the same old stuff every other book has. I need to make sure there are unique and important uncovered parts (hey, I like that as an alternate title: "JavaScript: The Uncovered Parts"!) to focus the content around. :)
from you-dont-know-js.
Related Issues (20)
- Yeah but you have the NITDA
- Backward and forward compatibility in Javascript specification HOT 2
- Stale Closure HOT 1
- Get Started - Appendix B: Bug in Proposed Solution HOT 3
- Add simplified Chinese translation to the 2ed HOT 4
- Misspellings detected by `typos` HOT 1
- What's this
- I think the condition in the if statement should be "(new.target === Point2d)" now it is "(new.target === Point2)" HOT 1
- Unable to see images on generated epub HOT 3
- The lexical binding of an arrow-function cannot be overridden (even with `new`!) HOT 4
- Value Type - Primitive HOT 7
- Reordering of "Why Closure?" and "An Alternative Perspective" in the toc HOT 1
- Hint at what coercion is being done HOT 2
- Promise.prototype.finally was introduced in ES2018, not E2019 HOT 1
- IsLessThan wrong output HOT 1
- Does `module` need quotes? HOT 1
- Copy right policy about teaching your book HOT 2
- Superficial explanation of Modules In Chapter 2 of Book 1 (2nd edition) HOT 4
- `add10To` vs `addTo10` HOT 2
- YDKJSY, coercion practice question HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from you-dont-know-js.