I want to set a default value to a variable.
When the body loads it runs a function which needs the variable to get the data.
The form will do the same onchange but the form elements will be hidden and added only if the user wants to see the filter options
My current code is
var grade = document.getElementById('grade').value;
If the id grade isnt available on the first load of the i want the grade to default to 0