Javascript Prime Number Program - How to Check if a Number is a Prime Number | JavaScript Program

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 พ.ย. 2024
  • In this video, learn Javascript Prime Number Program - How to Check if a Number is a Prime Number | JavaScript Program. Find all the videos of the JavaScript Programs - Basics to Advanced Course in this playlist: • JavaScript Programs Se...
    💎 Get Access to Premium Videos and Live Streams: / @wscubetech
    WsCube Tech is a leading Web, Mobile App & Digital Marketing company, and institute in India.
    We help businesses of all sizes to build their online presence, grow their business, and reach new heights.
    👉For Digital Marketing services (Brand Building, SEO, SMO, PPC, SEM, Content Writing), Web Development and App Development solutions, visit our website: www.wscubetech...
    👉Want to learn new skills and improve existing ones with in-depth and practical sessions? Enroll in our advanced online courses now and make yourself job-ready: courses.wscube...
    All the courses are job-oriented, up-to-date with the latest algorithms and modules, fully practical, and provide you hands-on projects.
    👉 Want to learn and acquire skills in English? Visit WsCube Tech English channel: bit.ly/2M3oYOs
    📞 For more info about the courses, call us: +91-9024244886, +91-9269698122
    ✅ CONNECT WITH THE FOUNDER (Mr. Kushagra Bhatia) -
    👉 Instagram - / kushagrabhatiaofficial
    👉 LinkedIn - / kushagra-bhatia
    Connect with WsCube Tech on social media for the latest offers, promos, job vacancies, and much more:
    ► Subscribe: bit.ly/wscubech...
    ► Facebook: / wsubetech.india
    ► Twitter: / wscubetechindia
    ► Instagram: / wscubetechindia
    ► LinkedIn : / wscubetechindia
    ► TH-cam: / wscubetechjodhpur
    ► Website: wscubetech.com
    -------------------------------------| Thanks |--------------------------
    #JavascriptPrograms #JavascriptProjects #ProgramsinJavascript

ความคิดเห็น • 20

  • @ahmedsuhailful
    @ahmedsuhailful ปีที่แล้ว

    Excellent logic!!! One thing I would add here is the missing of break function. Since it is not added, it shows non-prime number as prime number. For Example:4. Once I added, it worked properly.

  • @gamerbhai9211
    @gamerbhai9211 2 ปีที่แล้ว

    is video me aapke itne km likes hain or ab to ab super se uppar hogye keep going and never give up!

  • @Mayank_Bisht_MB
    @Mayank_Bisht_MB ปีที่แล้ว +2

    If number

  • @tawseefaziz9878
    @tawseefaziz9878 หลายเดือนก่อน

    What about if we enter the number as 2?

  • @sahnawazhussain1711
    @sahnawazhussain1711 2 ปีที่แล้ว +1

    Thank you your code is very fast

  • @gwalkrishna
    @gwalkrishna ปีที่แล้ว

    When we enter 2 then it's give undefined why

  • @NikhilSingh091
    @NikhilSingh091 2 ปีที่แล้ว +2

    Thank you

  • @raistar62
    @raistar62 ปีที่แล้ว

    Sir 2 number ko run karayiye nhi ho rha undefined output aa rha hai

  • @rokoangami4489
    @rokoangami4489 ปีที่แล้ว +1

    if i enter 2 ?

  • @sahnawazhussain1711
    @sahnawazhussain1711 2 ปีที่แล้ว

    number =2;
    Let's assume, i = 2; i

    • @sahnawazhussain1711
      @sahnawazhussain1711 2 ปีที่แล้ว +1

      I put one more else if condition for particular 2 number and it solved🥰

    • @abhijeetsingh7409
      @abhijeetsingh7409 2 ปีที่แล้ว

      Bhai me bhi yahi bolne aaya tha ki 2 ka ky😅

  • @rabitfire2001
    @rabitfire2001 2 ปีที่แล้ว +1

    Thanks alot sir❤️

  • @debleenaacharya9627
    @debleenaacharya9627 6 หลายเดือนก่อน

    11:11 5 prime number nahi hai aapne bola 😅

  • @prabhatpatel3633
    @prabhatpatel3633 ปีที่แล้ว

    let num = 2;
    if (num == 1) {
    console.log(`${num} is neither prime nor composite`);
    } else if (num < 1) {
    console.log(`${num} is not a prime number`);
    } else {
    let isPrime = true;
    for (let i = 2; i < num; i++) {
    if (num % i === 0) {
    isPrime = false;
    break;
    }
    }
    if (isPrime) {
    console.log(`${num} is a prime number`);
    } else {
    console.log(`${num} is not a prime number`);
    }
    }
    Updated version of code

  • @sahnawazhussain1711
    @sahnawazhussain1711 2 ปีที่แล้ว

    2 kaise check hoga

  • @sangeetavishwakarma3485
    @sangeetavishwakarma3485 ปีที่แล้ว

    Code is not working 😮😮

  • @haiderhossain3671
    @haiderhossain3671 2 ปีที่แล้ว +2

    first!

  • @shonawrites9472
    @shonawrites9472 ปีที่แล้ว

  • @raistar62
    @raistar62 ปีที่แล้ว

    Sir 2 number ko run karayiye nhi ho rha undefined output aa rha hai