The problem seems artificial to me. This problem is not harder than the similar problem with all other scripting languages, but is actually much easier, due to a lot of attention paid for JavaScript, due its unique character and high demand.
Use Visual Studio not earlier than 2013 (that is, 2013 or 2015): its Intellisense has been greatly improved; pleasure to work with. If you are using different platforms, try MonoDevelop and/or SharpDevelop; I haven't try them for a while, but check if they also improved Intellisense.
Use the debugger more often than you used to; it will quickly detect random mistakes like related to spelling. Develop code under the try-catch block providing special exception information. Unfortunately, you cannot catch lexical mistakes this way (please see the chapter of my article on this topic:
Handling Lexical Errors), but the debugger will. During development, you can do special very detailed dump of all exception information, which you later can modify or remove.
The usual effect of misspelling detected by a debugger is simple. Say, you have the object
A
and create some property
A.MyProperty
. If you later try to read this property but misspell it, the object, say,
A.MyProperti
will be assigned to a special
undefined
object (
primitive value). If a whole variable is misspelled, it will be
undefined
, too. This is easy to detect. Please see:
undefined — JavaScript | MDN.
You can use Visual Studio debugger, or some other debugger. Visual Studio debugger is the best to my taste, but unfortunately it requires, to best of my knowledge, IE (maybe Edge, too, I'm not sure), which I consider unacceptable and keep disabled most of the time. Therefore, I have to use some other debugger; and I use Chrome. It is, by far, not so comfortable, but still comprehensive. Besides, it performs the debugging under the decent browser. (I don't consider IE a real browser.)
Yes, you cannot reach the convenience in spelling detection as in compiled language, but the methods of work with interpretive languages is approaching the optimum possible for JavaScript.
—SA