JavaScript calculator using inputs value
Id attribute cannot contains spaces.

You can also use an object which contains the function's definition for all the possible operations.

var operators = {
  '+': function(a, b) { return +a + (+b) },
  '-': function(a, b) { return a - b },
  '/': function(a, b) { return a / b },
  '*': function(a, b) { return a * b },
};




var operators = {
    '+': function(a, b) { return +a + (+b) },
    '-': function(a, b) { return a - b },
    '/': function(a, b) { return a / b },
    '*': function(a, b) { return a * b },
};
function calculator() {
  var cel = document.getElementById("NumberF").value;
 var celular = document.getElementById("NumberS").value;
  var operator = document.getElementById("NumberO").value;
  var result = document.getElementById("resul");
  if(cel &amp;&amp; celular &amp;&amp; operator)
    result.innerHTML = operators[operator](cel, celular);
};
&lt;input placeholder="Number" id="NumberF" class="NumberF" onchange="calculator()"&gt;
&lt;input placeholder="/ ,  * ,  -  or +" id="NumberO" class="NumberO" onchange="calculator()"&gt;
&lt;input placeholder="Number" id="NumberS" class="NumberS" onchange="calculator()"&gt;
&lt;p id="resul"&gt;&lt;/p&gt;
&lt;button id="button" onclick="calculator()"&gt;Click&lt;/button&gt;