Javascript and I don't get along for some reason.
I made a small html file where I added two buttons "Read Text" and "Change Text".
In my Javascript file I added one variable text of value "Hello There!" and two functions. the first one output the text variable in the console log and alert it. The next button change the value of the text to "Welcome To Javascript!"
I ran the html file and clicked the button to read the text. It read the value perfectly. Then I changed the value and repressed the button. The value didn't change. From the log I saw that the script was reseeting whenever I call a function. Why is this happening? How can I keep the script running during the html file is open?