Regexp example given in tutorial not working for me

Regexp example given in the tutorial not working for me.
The Example is
A more practical use of lookaheads is to check two or more patterns in one string. Here is a (naively) simple password checker that looks for between 3 and 6 characters and at least one number:

let password = “abc123”;
let checkPass = /(?=\w{3,6})(?=\D*\d)/;
checkPass.test(password); // Returns true

But when i check this example -

let password = “988abcdefgh”;
let checkPass = /(?=\w{3,6})(?=\D*\d)/;
console.log(checkPass.test(password));

The result returns True even though there are more than 6 characters

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead

I’m using the Word2DITA conversion tool and there are quite a few find/replaces that I need to do to get the DITA files as I want them. I’m nearly there, but the questions are giving me a bit of grief.

Sarkari Result 192.168.l.l