can any one explain this example step by step its abot getting prime numbers :     

> function to show primes

  

    function showPrimes(n) {

    for (let i = 2; i < n; i++) {  
        
    if (!isPrime(i)) continue; 

    alert(i);  // a prime
      
    }
    }
     
    

> function to check prime


    function isPrime(n) {
    
    for (let i = 2; i < n; i++) {
      
    if ( n % i == 0) return false;
      
    }
    
    return true;
    
    }

> trigger to run the function and put the value of (n)

    showPrimes(10);
