What is wrong here

Tell us what’s happening:

Your code so far

let username = "JackOfAllTrades";
let userCheck = /\D[A-Za-z]*?/ig; // Change this line
let result = userCheck.test(username);


why last three is wrong?

first remove the g flag, then try again. Do not use g flag with test method.

when I remove [g] flag , he give me more error?

he still give error