How to create a phone mask in pure js?
Please tell me an example of an ALGORITHM to create a phone mask?
It is possible only in words, it is possible with a code,
but to understand the mechanics.
in fact there is just work with regulars. google "input mask js codepen" and look for examples. for example:
I found solutions, but I don't understand the ALGORITHM itself.
Unfortunately, in the title I cannot now clearly articulate what I want,
as I am required to have a "question"
and forbid the word "Prompt",
so don't pay attention to the title,
To place the code, please use CodePen or similar tool. Thanks you!