Code not working JavaScript
in my function "addIntel()", I created a function that would let me add stat points to a character after the character was created. I have encountered some problems: 1. When there are no stat points available, I am still alerted that a character has not been created yet. I believe this is because the function cannot reference an update in a value from another function. If so, is there a way I can work around it? 2. When I add stats, it will set the stats back to zero and add up from there. I want the stats to add up from the set stats that were made when you created a character. Example: Intelligence stat is 50. I want it to start at fifty and work up. 50 +1, +1, +1, etc. Instead it works like this: Intelligence is 50. stats get set to 0 on click and add up from there: 0 +1, +1, +1. https://code.sololearn.com/WHyfth9gjoer/#js