I don't think this variable is necessary, you can just refer to input.value (it's only assigned once and read once).