Hello guys i've got the following problem: How can i set, that the input will be added to the variable? The function Button_Hello_World will be used often and the string input is going to change ten times with different strings. The function is going to be reused thats why different strings will be implied later
var pointsString_To_Add=0;
onclick="javascript:Button_Hello_World(String_To_Add,5)"
function Button_Hello_World(string,variable)
{
points+string = variable;
}
And now pointsString_To_Add should be 5
points+string = points;is not valid syntax!String_To_Addwithout any quotes around it. Instead, assign a function toonclick.