IsPrime Function in JavaScript

See the original posting on DZone Python

The following code sample illustrates how to use JavaScript to determine if a number provided is a prime number or not. In this example, the number is hardcoded in the JavaScript. You can edit this and experiment with other values at the isPrime at CodePen
Preview Text: 

The following code sample illustrates how to use JavaScript to determine if a…