I want to check if the first element of the string is number and if it is number then there should not be any word attached with this number. Following is an example to make it clear:
function startsWithNumber(str) {
return /^\d/.test(str);
}
// Actual Output
console.log(startsWithNumber('123avocado')); //