Check out this JavaScript bin example.
I am substituting a with b here and it's a simplified version of my larger project goals.
Enter something in the input field and observe the console. Why does doTheJob(argument)
get triggered multiple times? (It seems to be based on the length of the input)
For your information, this is my actual project aim:
I intend to replace Persian digits in the view (۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰) with Latin numerals to reflect (1 2 3 4 5 6 7 8 9 0). You can see the specific issue in this JavaScript bin demo.