title: how can I check if a variable brought as a string is a number or letter in Javascript?
body: <p>I was trying to check a value that cames as a string is actually a string or a number and tried this:</p>
  
  <pre><code>let k = "a5b";
  for(var i = 0; i &lt; k.length; i++){
    var currentVal = k[i]
    if(typeof currentVal != " number"){
      console.log(currentVal + " is a letter")
    }
    else{
      console.log("its a number")
    }
  
  }
  </code></pre>
  
  <p>But, it didn't work. I'm trying to implement this approach to check if a returned value in the form of a string is a number or a word. How could I make it detect wether there is actually a number inside or not?</p>