js-mentorship-razvan / javascript

Javascript study notes
GNU General Public License v3.0
22 stars 2 forks source link

Solve 'Nothing special' #311

Closed odv closed 5 years ago

odv commented 5 years ago

https://www.codewars.com/kata/nothing-special/train/javascript

RazvanBugoi commented 5 years ago
function nothingSpecial(str) {
  return typeof str === "string" ? str.replace(/[^a-zA-Z0-9\s]+/gm , "") : "Not a string!";
}