syntax error on simple math function
<p>just trying to construct a simple function to find multiples of 3. my code is as follows:</p>

<pre><code>function multOfThree(){
var x = document.getElementById("id_inp_2").value;
var r = parseFloat(x) / 3;

   if (typeof r == "integer"){
    alert("yes '" x "' is a multiple of 3.");
    }
   else{
    alert("no '" x "' is not a multiple of 3.");
    }
}
</code></pre>

<p>but it keeps throwing "syntax error expected token ')'" and I don't really know why?</p>
