Two processes run concurrently (in parallel). If they both change some global variable that is shared. Who is writing it first? And what will the other see? What if they both first read the value of the variable, compute something based on it, and then write it again. What is the value of the variable? Multiple possibilities can occur.
Sorry for taking the time to read the aricle. It took me some time to get to reply. Your code seems fine to me. If matchText is some global variable it should work. Each call by setInternal will use a new matchText. So I am not sure what is your exact problem. Check if you ever enter the setInterval function to see if there is some race condition.
The Israeli market is definitely shifting towards Vue. I have one project with Outbrain where I built a web app to manage Kubernetes deployments of their platform group. You can learn more about it in my story: