JavaScript program to print all prime numbers in a given interval:
let start = 10;
let end = 30;
for (let i = start; i <= end; i++) {
let isPrime = true;
if (i <= 1) {
isPrime = false;
} else {
for (let j = 2; j < i; j++) {
if (i % j === 0) {
isPrime = false;
break;
}
}
}
if (isPrime) {
console.log(i);
}
}