js-mentorship-razvan / javascript

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

Solve 'validate code with simple regex' #297

Closed odv closed 5 years ago

odv commented 5 years ago

https://www.codewars.com/kata/validate-code-with-simple-regex/train/javascript

RazvanBugoi commented 5 years ago
function validateCode (code) {
  return /^[1-3]/.test(code);   
}