The code visible in the panel defines a function but doesn’t call it. (Abstraction wthout application).
You could either:
- write
clearRange()
under the function definition, or - enclose the whole function definition in parentheses, and follow it with an empty pair of parentheses
(function clearRange() {
...
})()