0
Javascript
i don`t understand this code please can someone help me function insert(num){ document.form.textview.value=document.form.textview.value+num; }
1 Answer
0
This snippet exactly appears in this code, examine it and it should become clear.
But I will explain anyway;
so the function is called insert here
insert(num) is the function.
Example: insert(1) sends 1 to the function in the script
insert('+') adds the plus
insert(2) adds 2
so what happens is
1+2
then the equal function is called by pressing =
https://code.sololearn.com/WN947T82Nn2V/?ref=app
function insert(num){
document.form.textview.value=document.form.textview.value+num;
}
form is the name = "form" of the form
textview is the input fields name = "textview"
value is the value you enter + num variable