Contact: aviboots(AT)netvision.net.il
39,914 questions
51,847 answers
573 users
const str = 'javascript python 340 typescript 981 node.js'; const index = str.search(/[0-9]/); const firstDigit = index != -1 ? Number(str[index]) : -1; console.log(firstDigit); /* run: 3 */