Problem 5: smallest multiple(help required)

Tell us what’s happening:

Your code so far


function smallestMult(n) {
   let m=1
  while(1)
  {
     let ct=0
  for(let i=1;i<=n;i++)
  {
    if(m%i==0)
      ct=ct+1
  }
  if(ct==n)
    break
  m++
  }
  return m;
}

smallestMult(20);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/coding-interview-prep/project-euler/problem-5-smallest-multiple
NOT ABLE TO GET ALL CASES PASSED EVENTHOUGH IT IS WORKING PERFECTLY FINE IN MY BROWSER

your algorithm needs too many steps , it is stopped by the infinite loop protection, you need to refactor your code to be faster