generate functionFri, 18 Nov 2022

Correct variable names consist only of English letters, digits and underscores and they can't start with a digit. Check if the given string is a correct variable name.

function variableName(n: string): boolean { r = /^[a-zA-Z_]\w*$/ if (n.match(r)) return true else return false }

Generate More

Questions about programming?Chat with your personal AI assistant