This is a bit pedantic, but a confirmation field is for accidental mis-entry rather than misspelling as such given the nature of passwords.
To answer your question; yes, a password re-entry field is just for verification of the user's input.
JavaScript could be used to ensure the entry meets the password requirements (length, special/valid characters, strength, etc.), but what if the user has JavaScript disabled? You'd have to code for the password to be validated server side in this case. Also, it's possible that, as the code is client side, it could be tampered with to bypass your checks (some people just like to break things). On top of that, from a web design perspective, the client will need to download more code in order to achieve this instead of posting an extra form field so there's an extra (albeit very small) data-use overhead when considering mobile.
All this can be rendered unnecessary however. If your password reset process is secure and robust enough (e.g. require email address verification), then you arguably don't need the user to verify that they've typed in what they meant to. You'd need a process to remove accounts that hadn't been validated though, in case they mis-entered their email address... unless you get them to enter their email address twice ;) For example, based on the fact Stack Overflow only required me to enter a password once upon registration, this seems to be the approach this site uses.
Hope this helps.