I believe this is possible (and maybe not even hard) as I only mean the language itself - no browser APIs, no frameworks/libraries/tooling, no patterns and practices beyond those necessary to understand the features and the quirks of the language itself, what they can be used for and how to deal with them correctly.
Where do I go and how hard is this actually going to be?
[0] - https://github.com/getify/You-Dont-Know-JS
[1] - https://www.ecma-international.org/publications/standards/Ec...
Understand exactly how JavaScript gets converted under the hood. Remember, ECMA could be implemented in any language not just C/C++. What you're looking for is algorithmic understanding.
For example, here's the snippet that explains how "new" works in JavaScript https://www.ecma-international.org/ecma-262/5.1/#sec-15.2.2..... Going through the algorithm, your first thought may be "wtf is [[Prototype]]"? Dig into it. Understand when, where, and how [[proto]] and __proto__ get assigned. Learn about the cyclic references that allow everything to be an object including functions.
Of course, feel free to use external resources to assist you while reading ECMA since it is quite dry. For the example above, this amazing Stack Overflow post can help you visualize the algorithm: https://stackoverflow.com/questions/650764/how-does-proto-di...
You'll quickly be forced to ask yourself what you want to accomplish with the knowledge you've gained and from there you will have to set yourself another course of learning the relevant APIs, frameworks, libraries, and tooling associated with that field.
The fastest way to learn a language is to use it constantly, so my actual recommendation would be to begin by building a series of small toy projects. Build the classic ToDo app in whatever form you prefer. Build a calculator, a text editor, pong, an HTTP server, a database, a data visualization tool, a physics simulation, a paint program, etc., etc. None of them should be overly complicated, at first at least, but they will force you to think about how you use the language and will quickly show up the large gaps in your knowledge about it as well as point you in the direction of the current 'state of the art'.
"Not hearing is not as good as hearing, hearing is not as good as seeing, seeing is not as good as knowing, knowing is not as good as acting; true learning continues until it is put into action." --Xunzi
or if you prefer
"What I cannot create, I do not understand." --Richard Feynman
Javascript doesn't exist in a vacuum, and focusing on becoming an expert on just the language is IMHO a misguided effort.
The language is a means to an end and the most useful bits are exactly in the API's that the runtime provide, be they the browser or something like node / react-native.
The advice I often give for "how do I learn ___" is find something you want to make, do what you need to do to arrive at the most basic version that you possible can, then iterate.
If you have someone who can help direct you when you get stuck, or can point out ways things can be vastly better with minimal effort that will be a real boon to your efforts.
Focusing on arcane corners of the language just isn't productive. If you have a mission, you can deal with those when they come up (which due to their arcane nature, will be rarely if at all).
How does one take this knowledge and learn the browser APIs (in particular, best practices around those APIs) plus to navigate the frontend ecosystem in general without getting overwhelmed? Obviously you learn the APIs by building stuff, which I do. I can and do write frontend code, but always with the feeling that I've never learned this stuff properly.
I know there are tutorials aplenty on this stuff -- other than MDN, is there anything authoritative, comprehensive, and deep? Like, the SICP or TAOP of frontend programming?
I've worked with JavaScript many times through the years, and never felt that I got close to becoming an expert no matter what. The language it self is in the way. Browser compatibility, language weirdness (like the =, == or === mess) and there are a lot of standards around. But now a days working with ClojureScript, which settles the language problems, I get to focus on getting good at libraries, react and browser-stuff.
I hope I never have to work with vanilla JavaScript again, but since ClojureScript is a niche I'm pretty sure this dream will burst at some point. But I can attest ClojureScript has brought significantly more enjoyment into my life when dealing with front-end development.
It doesn't cover the complete language, in particular it doesn't cover all outdated concepts and backward-compatible features. To get a complete understanding you would have to read the JavaScript specifications, but I don't think it makes sense to start there without having a solid understanding of the basic concepts first.
https://www.udemy.com/user/sgslo/
[Not sponsered, non-affiliate link, etc]
This point is made in the (now very outdated) book "Javascript: The Good Parts," https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockfo.... Crockford, the author, brings you through the best way to write Javascript in 2008.
Related note: I once attended a talk from Crockford in 2010 where he was rather religious about how async code was significantly better than threads. I pointed out that async code is significantly harder to write due to the mess of callbacks, and his answer was quite rude. Now Javascript has async-await, which fixes the madness that comes from callbacks.
enough said
JS is a rather forgiving language (maybe too forgiving) that's very suitable for learning by trial and error. Get the basics, start hacking, find what works and what doesn't, look at other people's code to draw inspiration etc...
> Where do I go?
You don't really need to go anywhere else (especially not into the vortex of looking for the best resource) to learn and be confident with vanilla javascript.
> ... and how hard is this actually going to be?
Well that depends more on you and your preference for learning materials. I studied a chapter a day (like 3 hours concentrated per day) and was done in 3 weeks.
If you don’t know any programming, it’s a bad idea to start by JavaScript. Its design has followed a path from a hackish webpage scripting language to being used server-side, so a lot has evolved and a lot of crap remains from the old days. If you don’t know programming, you’ll have a hard time discerning the newer, cleaner features from the older less polished ones.
In my opinion it’s easier to learn java or C or Kotlin, which are a lot neater. And then learn about how JavaScript differs.
I’ve found the courses on this site to be great. Easy to follow, diverse, and useful for non-front end engineers like myself.
However, just being able to do something in a language and being able to do it the most correct and future-proof way is different, and in JS, "best practices" seem to be constantly evolving with language and community. Every library and framework seem to be doing things in a slightly different way, and there's a lot of freedom to experiment with different coding styles and programming paradigms (unlike in a language like Go). Personally, I would suggest Typescript for professional projects, but there are plenty of very knowledgegble and competent people with a lot of different opinions on it. If you're the kind of person who likes this kind of environment, you'll fall in love with JS ecosystem.
Why choose V8 as your target, and not a recent standard that multiple modern browsers support?
IMHO, Eloquent JavaScript is a great book but not really beginner-friendly. It's a solid choice if you are already proficient with another language.
This course really pushed my js knowledge forward!
There's not a lot of point in obsessing over the minutiae that is constantly in flux and varying at the whim of the Chrome and Firefox teams. You'd be aiming at a moving target, and one that is constantly jinking up and down and side to side, even when it is going in the same direction and not doubling back on itself.
This isn't comprehensive, but it's probably the most helpful deep-dive I've ever seen about some aspect of JavaScript. It's about the Event Loop, which is one of the biggest differences between JS and comparable languages like Python: https://www.youtube.com/watch?v=8aGhZQkoFbQ
Contrary to what you might think, even though the event loop is in some sense "distinct from the language", it isn't simply an API. You can't really have JavaScript without the event loop; it exists in both the browser and in Node, and is the basis for most of the language's advantages.
If you mean ES6 as "modern" JS, then you might want to avoid any material on prototypical nature of "true" JS (which it still is under the hood). Personally I find classes and modules to be very useful.
Although you say you don't care for DOM, CSS and the many frameworks, you might need still need to build a small HTML file to kick start your JS programs. I do all my exploring and learning in Chrome's DevTools console and debugger. JS is not that difficult to learn if you already know a curly brace language (C, C++, C#, Java, etc). Even after years of working with JS, fiddling with DOM still catches me off guard on occasion.
I have found that understanding prehistoric JS provides a good base for making sense of where JS is today.
John Resig's (jquery) writings were very helpful, and this site is an absolute must for me.
[Javascript: The Good Parts](http://shop.oreilly.com/product/9780596517748.do) -- Once something makes it into Javascript, it's there forever. While this book only covers up to ES5, it creates a good foundation for things to use and things to avoid. This is especially relevant if you wind up working with older codebases.
[Exploring ES6](https://exploringjs.com/es6/) -- This book will take you from the ES5 land into the world of ES6 (ES 2015). It does NOT cover newer features from ES2016-ES2019, but only a couple of those are major updates.
[Javascript Allonge](https://leanpub.com/javascriptallongesix/read) -- A nice, soft introduction to functional JS concepts.
[You don't know JS](https://github.com/getify/You-Dont-Know-JS/blob/2nd-ed/READM...) -- an overview of the language feature by feature. I feel it's a bit too advanced for an introduction on quite a few things though.
I'd avoid Javascript: The Definitive Guide. It doesn't do a great job of distinguishing between the good and bad parts of the language and some examples aren't best practice anymore. Maybe they'll get around to creating a 7th edition one day that'll be worth reading. Likewise, I'd avoid reading the spec until you've worked with the language for a while. It's not light reading. I'd start with the 5.1 edition because it's much easier to approach (and much smaller at only around 250 pages). Once you've read that, it'll make reading the newer specs much easier (ES2019 spec is over 3x as long).
It takes years to become good at programming. Once you know programming, it usually takes hours to learn a new (procedural) programming language.
I also tried to learn JS from all the popular books and the problem was that most of the stuff I read in thos, I've never used in real life. And so much sophisticated stuff which books didn't teach was hidden in some lib's Github repos.
That said, if you want a comprehensive read about Javascript, there's You don't know JS: https://github.com/getify/You-Dont-Know-JS
https://www.youtube.com/watch?v=qoSksQ4s_hg&list=PL4cUxeGkcC...
https://www.youtube.com/watch?v=iWOYAxlnaww&list=PL4cUxeGkcC...
I'd also use various materials, like books or courses online.
Finally, start a small project in JS, best way to apply your knowledge and discover gaps.
Pure JS will be a bit boring. You’d want to learn some Node apis to do something useful. But you could limit it to file I/o if it’s the JS you want to focus on. At least that’ll give you some async experience which I’m sure you’d be keen to learn.
now that book is old and es6 changed a lot of things, so find a good book read it and if it has examples go thru them. only with examples was i able to understand scope inheritence and asynchronous calls in javascipt. like if you call settimeout in loop and all other gotchas.
I don't mean babel. I mean from scratch. Using whatever language you're comfortable with, turn lists of expressions into JS code.
https://github.com/sctb/lumen does this in just a couple thousand lines.
this is where i got started , now got a good handle at JS, but not sure if it will fit / suit you
(I know the author lurks here sometimes)
The JS courses are free.
I just went to the console and tried all things that should and should not have work. There you’ll learn about the specifics of prototyping, properties, operators, everything, and get insights for what’s going on under the hood. Didn’t find these details anywhere else. All sources of information are situational, down-to-earth utilitarian and resemble grandma’s cooking recipes, while what you seem to want is precise chemistry. (ed: another problem with js is that most books on it are out of date by design, e.g. one of the suggested links around says that prototypes can only hold methods and not values; what else is wrong there?)
>no browser APIs
A big part of js internals lies in the Object namespace. See also Symbol. (MDN for both)
i had no idea eloquent javascript was updated with modern javascript. what a surprise! i read that book many years ago. i will check the other resources too.
My recommendation for learning this language is to forget all the books and helpful guides. Just build something. Here is a good reference of the standard methods: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Of that reference list the most immediately important areas are: Array and String.
My personal recommendation for really embracing this language are to learn and master scope in the language. Don't mess around with class, prototypes, inheritance, new, or this until after you have built at least one tool in the language. Most people coming into this language jump in expecting to program in the style of some former language only to be disappointed that JavaScript is not in fact their former language.
My second personal recommendation is to gain confidence around the expressiveness of functions in this language. Functions are first-class objects, which means they can be used anywhere a primitive type can be used. https://developer.mozilla.org/en-US/docs/Glossary/First-clas...
Perhaps the most important thing to learn for any language is data structures. If you have a solid understanding of data structures you can bend any algorithm to your will.
You mention not learning any APIs, but there are two exceptions you should make in order to better understand the language.
* DOM - If you are learning JavaScript in the browser I recommend learning the DOM. I mean the standard imperative DOM methods from the DOM specification. The DOM is a tree model of nodes where each node knows its place in the tree relative to its peers. By appreciating the nature of those fluid relationships you can do incredible things with little effort that execute incredibly fast. I built a complete GUI in the browser in just over 2 weeks that executes as fast as the OS's GUI because I had an understanding of the DOM. Here is the video demo: http://mailmarkup.org/sharefile/demo1.mp4 and code: https://github.com/prettydiff/share-file-systems
* Nodes fs library - If you are learning JavaScript on the terminal with Node.js I recommend learning Node's fs library methods. The file system is also a tree model comprised of nodes that can be walked very quickly.
After you have built one or more tools in this language you will independently learn to appreciate the conventions in this language that best suit your personal programming styles.