I've done a lot of stuff on my own as far as learning, but I need the extra help, so I'm considering a school. I'm doing Flatirons pre-coursework, and am having issues.
Long-story short, I'm attempting to parse a string into a number, but every time I go to modify the
innerHTML of that number, it removes the definition of that variable.
Check it out:
var numFriends = document.numFriends.innerHTML = numFriends.innerHTML + 1;
Typed into Dev Console:
false which means it is now a number. Great!
numFriends.innerHTML = numFriends.innerHTML + 1;
Uncaught TypeError: Cannot read property 'innerHTML' of undefined
at VM1979 pen.js:6
Here is the codepen: