3 ms·
> In JS you can misspell object fields's name and learn about it only when undefined value will cause an error somewhere in another module. You should try "use
by josteink 10y ago
> In JS you can misspell object fields's name and learn about it only when undefined value will cause an error somewhere in another module.
You should try "use strict" sometime. If you write sloppy JS, you'll find out in no time.
Javascript will still have most of its warts, mind you. But some of the most obvious errors should at least be catchable.
- codedokode 10y agoIt doesn't help to find a misspelled property (and doesn't prevent you from dividing by zero too). You need a static typing system like TypeScript to detect such kind of bugs.