Prime reversion algorithm - JavaScript
Your code looks good, just a few small things I would change. First, I didn't know where to start reading your code, since the function you would start with is at the bottom, and your example doesn't actually call it.

parseInt is used to convert a string to a number. If you just want to floor a number, use Math.floor instead. It is much faster.

In the isPrime function, every iteration of the loop calculates the same square root, which is not a simple calculation. Store the square root in a variable before the loop, and compare to that.

The getPrimes function works fine, but has potential for optimization, based on what we know about primes. For instance, with exception of 2, every primes is odd, so you only need to check every second number. You could also look into other methods, like a prime sieve.

There is no reason to still is var. Use let and const.