function valuelAdd(input, figure) { switch (input.value) { case null: case '0': input.value = figure break default: input.value += figure } }