Find All Prime Numbers Between Range in JavaScript | How to Find Prime Numbers in JS

Find All Prime Numbers Between Range in JavaScript | How to Find Prime Numbers in JS

WebStylePress

1 год назад

2,140 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@dopetag
@dopetag - 01.07.2023 16:02

I saw your other video called "Check a Number is Prime or Not using Javascript | How to Find Prime Numbers in JS".
In that video, you use different condition for your for loop in isPrime function:
i < num

Could you explain using i <= Math.sqrt(num) in the first approach of this video?

Thank you in advance

Ответить