Enable Button if enough words are inputted in Text Box

And for setTimeout, I have tried putting it in different place but I have no confidence at all. I have also tried to combine in the above code but no luck.

if (realValue.length >= 4) {
setTimeout(() => {
$w(‘#regenter’).enable()
}, 10);


BTW, what I am doing is something like this!