0
I NEED YOUR HELP GUYS
I CREATED A VARIABLE FIRST AND THEN DECLARED IT INSIDE A FUNCTION, BUT IT DOESN'T WORK, GOT thrown ERRORS INSTEAD https://code.sololearn.com/WY0nGBhi2coK/#js
2 Respostas
+ 6
From all your JS only part that is inside your function will be executed. So you have to declare and initiate variables inside function myFunction() {
var str = document.getElementById("massagebox").value;
var sms = document.getElementById("mess");
And than use text from sms
+ 5
Hey there 🙂
When you type in ALL CAPS, it means that you are shouting...
----
In order to use the variables, you will need to declare them in myFunction as Dima Makieiev had mentioned.