Just me or does eloquent javascript... sort of suck? Should I learn from someplace else?
In terms of explaining things, I feel like the author fails to adequately provide enough explanation (or one at all actually) so people working through the book for the first time can actually understand what's going on.
Several examples:
var numbers = [1, 2, 3, 4, 5], sum = 0;
forEach(numbers, function(number) {
sum += number;
});
console.log(sum);
// → 15
I have no idea how this works because I don't know how "number" is recognized as one variable in the array. As in, how is the parameter "number" inside the function that's passed itself as an parameter inside forEach used? An explanation for this behaviour would be nice but it's not found within the book.
Then you've got this:
function noisy(f) {
return function(arg) {
console.log("calling with", arg);
var val = f(arg);
console.log("called with", arg, "- got", val);
return val;
};
}
noisy(Boolean)(0);
I've never seen anything like noisy(Boolean)(0), in terms of the two closed parentheses next to each other. I have no idea what this does and the book doesnt tell me. I believe earlier in the book it also did a type conversion to string for the first time without explaining what it did, and I feel this might be a type conversion too but again I'm not sure.
Explanations would be great but I'm worried that this is a trend that will keep happening as I progress.
Posted Apr 30, 2016, 12:10 AM UTC · edited
No one source is going to be everything you need, you have questions which is normal, mess around with the code and see what happens when you change things, just reading the book will teach you little.
In general though I don't think that elonquent javascript is a great resource for someone new to programming to use. It is better once you understand programming more.
I definitely understand that but I just think it's weird when the book introduces code that it has never talked about before and expects you to understand it, seeing as the book is sort of an intro book. What other resource would you recommend?
eloquent is too many times wrongly recommended for beginners... I'm still new but went through codecademy, codeschool then read Beginning Javascript and now doing a (paid) angular tutorial by watchandcode.com which is pretty great.
The thing I would have done in the start is asked myself what I wanted to build. If you have a vision for a thing it is much easier to learn and pick up the necessary bits.
I would highly recommend Tony Alicea's Javascript course on Udemy if you want to gain a deep understanding of the language. Tony puts a lot of care into crafting his courses, and has a knack for explaining concepts with clarity. It's $20 on Udemy, but you can preview the first 3.5 hours of the course for free on youtube to see if it's what you're looking for :)