Convert a String to a Number!

JavaScript

const stringToNumber = function(str) {
  return parseInt(str);
}

Tags

  1. javascript (Private)
  2. 8-kyu (Private)
  3. codewars (Private)
  4. answer (Private)