title: How to get the last alphabetic character in string?
body: <p>Here, I want to give each character a space except for the last <em>alphabetic</em> one:  </p>
  
  <pre><code>var str = "test"
  var result = "";
  for (var i = 0; i &lt; str.length; i++) {
      result += (/*condition*/) ? str[i] 
                                : str[i] + " ";
  } 
  console.log(result);
  </code></pre>
  
  <p>So it prints "t e s t".  </p>
  
  <p>I tried this <code>(i === str.length - 1)</code> but it didn't work when a string had period(.) as it's last character ("test.") while I wanna target only alphabetics.</p>