Loops and String in JavaScript || JavaScript Series 2024

Поділитися
Вставка
  • Опубліковано 29 січ 2025

КОМЕНТАРІ • 201

  • @extractionez
    @extractionez 9 місяців тому +24

    53:25 the difference between let name ="hello"; and let Name = new String("hello"); is that if we print the typeof() both the string then the first one will give output as string and the second one will give the output as object.
    example:-
    let str = new String('Hello') - Converts string to object
    let str = 'Hello' - Maintain type (string)

  • @theaesthiticravi
    @theaesthiticravi 3 місяці тому +2

    30:46 Yes, we can use a for loop without giving it a starting point (initialization), a stopping rule (condition), or a step (updation). However, this kind of loop can run forever if you're not careful.
    Here's an example:
    for ( ; ; ) {
    console.log("This will run forever");
    }
    In this loop:
    There's no starting value.
    There's no rule for when the loop should stop, so it keeps going.
    There's no update to change anything each time it loops.
    To stop it from running forever, we can use a break statement to end the loop when we want:
    let count = 0;
    for ( ; ; ) {
    console.log(count);
    count++; // This increases the count each time
    if (count === 5) {
    break; // This stops the loop when count reaches 5
    }
    }
    This will print numbers from 0 to 4, then stop.

  • @subhadeepchatterjee1933
    @subhadeepchatterjee1933 9 місяців тому +34

    30:35
    We can write for loop without any conditions
    like for example :
    let i = 1;
    for(;;){
    console.log(i);
    }
    This will run without any error and give output infinite 1s
    But we can use for loop by adding conditions inside loop body
    let i = 1;
    for(;;){
    console.log(i);
    i++;
    if(i >= 10)
    break;
    }
    This will print 1 to 9

  • @gorityalasanthosh9840
    @gorityalasanthosh9840 9 місяців тому +6

    Very thankful for being like a brother for explaining all skills

  • @maddy39833
    @maddy39833 8 місяців тому +7

    We can write for loop without any conditions
    like for example :
    let i = 1;
    for(;;){
    console.log(i);
    }
    This will run without any error and give output infinite 1s
    But we can use for loop by adding conditions inside loop body
    let i = 1;
    for(;;){
    console.log(i);
    i++;
    if(i >= 10)
    break;
    }
    This will print 1 to 9

  • @Justfollowyar
    @Justfollowyar 6 місяців тому +3

    bhai kasam se aaj tak kisi ne itni achi trah se loop ni samjaya.... love you bhai😘😘

  • @extractionez
    @extractionez 9 місяців тому +7

    30:46 haa bhaiya hum for loop ko bina un teen conditions (initialization,condition,updation) ke likh sakte hai. example:-
    let i=1;
    for( ; ; )
    {
    console.log(i);
    i++;
    if(i>10)
    break;
    }
    ye example hai 1to10 tk ki counting print karne ka without using those three confitions inside the loop body.

  • @pratyushranjan6045
    @pratyushranjan6045 7 місяців тому +3

    smjh me aa rha hai mujhe sab kuch abhi tk mai while tk pahucha huu aab break ke baad padhunga thank u bhaiy aap bahut aache pahate hai love u from nitN; abhi mera typing spped thaa 40rpm;;

  • @aditya_webdev_mearn
    @aditya_webdev_mearn 9 місяців тому +2

    bahut khub Babbar bhaiya maza aa gaya loops me; pura concept clear
    for loop without using any initialisation , condition or updation it is a infinite loop

  • @motivational._motion
    @motivational._motion 22 дні тому

    30:55 bhaiya sahi samjh a Raha hai aise hi padhte raho zindagi bhar😊

  • @NishantKumar_N
    @NishantKumar_N 9 місяців тому

    30:39 i ko initialize karna hi padega and condition bhi jaruri hai, but increment operator nahi lagane per yah execute to ho jayega lekin infinite loop ban jayega, isliye yah bhi jaruri ho jata hai as a good practice.

  • @hammercoding1755
    @hammercoding1755 9 місяців тому +21

    zyada excited mat ho jawo kuch din bad fir sy long time no see ho jana ha 😂😂

    • @CodeHelp
      @CodeHelp  9 місяців тому +47

      Koshish poori hai aisa na ho

    • @abhisheksingh_26
      @abhisheksingh_26 9 місяців тому +3

      Thoda sa kripa hamlogo par bhi kr dijiye apne superme batch ki tarah importance dekar to sayad aisa na ❤🙏

    • @01_Priyanshu
      @01_Priyanshu 9 місяців тому +1

      ​@@CodeHelphamare purane love bhaiya koshish nhi kiya karte the, wo unka by default feature tha ki course complete karna ha toh karna ha pta nhi ye kon ha jo koshish kar rhe ha despite of all of these respect you man ho ske toh saath end tak nibhana god bless you❤

    • @CodeHelp
      @CodeHelp  9 місяців тому +20

      @@01_Priyanshu Course toh complete krunga hi bro, karna chahta hu mnn se.
      Beech me itna Gap hogya toh thora uncomfortable hu bss or kuch nhi.
      Jo kaha h vo definitely hoga

    • @hrushikeshsuryawanshi708
      @hrushikeshsuryawanshi708 9 місяців тому +2

      ​@@CodeHelpmuze pata hai ki ye course jarur complete hoga aur consistency ke sath pura hoga don't worry subscribers

  • @bhanwishree1217
    @bhanwishree1217 2 місяці тому

    understood everything! Thanks so much for making us understand everything so well..!

  • @Nonone6263
    @Nonone6263 9 місяців тому +1

    No, In JavaScript, you have the flexibility to omit any or all parts of the for loop as needed for your specific use case. Just keep in mind that clarity and readability are important.
    example :
    // With all three parts
    for (let i = 0; i < 5; i++) {
    console.log(i);
    }
    // Omitting initialization
    let j = 0;
    for (; j < 5; j++) {
    console.log(j);
    }
    // Omitting condition
    for (let k = 0; ; k++) {
    if (k >= 5) {
    break;
    }
    console.log(k);
    }
    // Omitting update
    for (let l = 0; l < 5;) {
    console.log(l);
    l++;
    }

  • @Rohitkumar-mv3dn
    @Rohitkumar-mv3dn 19 годин тому

    30:35 Yes, it's possible to write for-loop without any initialization, condition, and updation.
    e.g-
    for (;;) {
    console.log("This is an infinite loop");
    break; // Without this, it will run forever.
    }

  • @KuldeepKumar-hr3wu
    @KuldeepKumar-hr3wu 7 днів тому

    sir aap bhout accha padhate h aap ke jesa koi nhi pada sakata hai

  • @ayush.tiwarios2105
    @ayush.tiwarios2105 6 місяців тому +5

    00:06 Fundamental concepts on loops and strings in JavaScript
    02:08 Using loops in JavaScript to avoid code duplication and maintainability issues.
    05:46 Introduction to different types of loops in JavaScript
    07:32 Understanding the syntax of for loops
    11:18 Understanding increment operations and condition checking in loops
    13:10 Understanding the for loop in JavaScript
    16:51 Exploring reverse counting in a for loop in JavaScript.
    18:31 Demonstration of loops and string manipulation in JavaScript
    21:52 Understanding 'break' statement in JavaScript loops
    23:52 Understanding loops and conditions in JavaScript
    27:27 Understanding loop iterations and conditions in JavaScript
    29:23 Understanding the dynamics and types of loops
    33:03 Explanation of the while loop in JavaScript
    34:49 Understanding loops and strings in JavaScript
    38:41 Understanding loops and strings in JavaScript is crucial for proper code execution.
    40:32 Understanding types of loops in JavaScript
    43:54 Understanding the logic of loops in JavaScript
    45:40 Understanding the do-while loop in JavaScript
    49:15 Understanding the concept of strings in JavaScript
    50:52 Introduction to different ways of creating strings in JavaScript
    54:51 Understanding string concatenation and backticks usage in JavaScript
    56:35 Accessing values inside backticks in JavaScript
    59:57 Understanding indexing and string manipulation in JavaScript
    1:01:42 Understanding substring method and split method in JavaScript
    1:05:39 Understanding the usage of backslashes in JavaScript strings
    1:07:23 Using backslash as a special character in JavaScript

  • @iqfacts8647
    @iqfacts8647 9 місяців тому

    53:40
    In above statement the allocation is static whereas in last statement we are allocating memory in dynamic way using new keyword.

  • @Piyußh-r2n
    @Piyußh-r2n 7 місяців тому +1

    what a nice class . Great content 💯

  • @kapilplays2127
    @kapilplays2127 5 місяців тому +1

    All Clear sir your way of teaching is too good

  • @Sanju-o5q
    @Sanju-o5q 5 днів тому

    Sab samajh me aa gya bhaiya
    Lecture 41 Complete ✅

  • @ramanshubhvlog
    @ramanshubhvlog 9 місяців тому

    Yes in for loop all three value is important like updation initialisation and starting condition. All three value carry importance in their field . If any value is missing the loop was not completed properly updation condition says value must be updated on every iteration .
    Initialisation says at which value we will take start at what value .
    Stopping condition says at which place or digit we run a loop .

  • @DipsOfficial802
    @DipsOfficial802 9 місяців тому +1

    Understood bhaiya🔥🔥

  • @narutodihargo
    @narutodihargo 9 місяців тому +1

    01:30= Loops , 05:40= Types of Loops,

  • @AmaimaAmir
    @AmaimaAmir Місяць тому

    sai smjh mai aya sir thnkks😇😇😇😇😇

  • @DrcZedits8869
    @DrcZedits8869 17 днів тому +1

    Sahi hai 😁

  • @SamruddhiMahajan-o7e
    @SamruddhiMahajan-o7e 8 місяців тому

    I love to learn with you sir. Hats off to your teaching..🤗😎

  • @_khanna_editz
    @_khanna_editz 6 місяців тому

    boht bdiaa pdaya bhaiya aapne number 1 explanation with full of practical experience thanks bhaiya❣❣ Bhagwaan apko hmesha khush rkhe or aap hmare liye aise he kaam krte rhe.. Dhanyawaad

  • @asmikapanchal277
    @asmikapanchal277 Місяць тому

    Understood perfectly 👌

  • @DeepakRana-u6o
    @DeepakRana-u6o 9 місяців тому +1

    Wow nice one.!! WELL EXPLAINED 🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩

  • @hindu_rashtra1008
    @hindu_rashtra1008 6 місяців тому +1

    Best teacher on UA-cam ❤😊

  • @SR_HULK
    @SR_HULK Місяць тому

    BADA VALA THENKU BHAI 🤝💖

  • @manjeetkumarsingh4288
    @manjeetkumarsingh4288 8 місяців тому

    Great content delivery 🙏🙏

  • @ShivaniSingh-nb9ox
    @ShivaniSingh-nb9ox 7 місяців тому

    The initialization statement in a for loop is used to initialize the loop counter variable, which is typically used to control the loop's execution. Without an initialization statement, the loop counter variable will not have a value, and the loop will not have any way to know how many times it should execute.

  • @AjayChavan-gf8ls
    @AjayChavan-gf8ls Місяць тому

    bhiaya sahi padhaya samaz me aaraha he ❤

  • @igadibhai860
    @igadibhai860 8 місяців тому

    Check out 30:35
    We can write get output Without Initialization of i
    let i = 0;
    for (; i

  • @SatyaGupta.
    @SatyaGupta. Місяць тому

    ❤❤❤❤❤maja aa gya sir ji❤❤❤❤❤

  • @studybruh
    @studybruh 3 місяці тому

    sahi padhaya bhaiya samajh main aa raha hai

  • @farziikhan8917
    @farziikhan8917 9 місяців тому

    Thanks Bhaya. Pls series continuesly raky hr din aik video upload kry gap na dena pls. ap buhut achy samjaty hai buhut easy hota hai or concept fully clear rhta hai jo ap ny parhaya hota hai

  • @riya25.01
    @riya25.01 9 місяців тому

    best bhaiya . smaj me aagyaaa❤❤❤❤❤

  • @raksvision
    @raksvision 9 місяців тому +1

    At 50:30,
    let firstName = "Rakesh"; is String primitive, this is Immutable, these are Stored in the Memory directly.
    where as
    let firstName = new String("Rakesh"); is String Object, this is Mutable, this not Efficient for Memory Management when compare to String Primitives.

  • @SamruddhiMahajan-o7e
    @SamruddhiMahajan-o7e 8 місяців тому

    thank you for tutorials sir , they are very useful and easy to understand.

  • @princecharlie4725
    @princecharlie4725 3 місяці тому

    good job keep it up 26-10-2024 this lecture complete..

  • @Ramankumar-l3s
    @Ramankumar-l3s Місяць тому

    Awesome course🙂

  • @innervoice9666
    @innervoice9666 6 місяців тому

    great video sir please now continue the series

  • @aryanbachchu7853
    @aryanbachchu7853 9 місяців тому +1

    on of the best playlist for beginners

  • @khawar256
    @khawar256 2 місяці тому

    bhiya bhot sahi prhaty ho ap❤❤❤

  • @ranatariq8638
    @ranatariq8638 9 місяців тому

    Bht bht bariya ....

  • @aaryankakade328
    @aaryankakade328 7 місяців тому +6

    The three components within the for loop are optional. We can omit any of the components as per our needs.
    Examples -
    Omitting Initialization:
    let i = 0;
    for (; i < 5; i++) {
    console.log(i);
    }
    Omitting Condition:
    for (let i = 0; ; i++) {
    console.log(i);
    if (i >= 4) break;
    }
    Omitting Updation:
    for (let i = 0; i < 5; ) {
    console.log(i);
    i++;
    }
    Samajh aa gya bhaiya. Loved the DSA C++ series as well.❤❤❤

  • @krishkumar491
    @krishkumar491 9 місяців тому

    Bhaiya sab acche se samaj mai aa raha hai

  • @AryanSingh-jl8dh
    @AryanSingh-jl8dh 7 місяців тому +1

    50:30 last

  • @KaushalSingh-b6u
    @KaushalSingh-b6u 3 місяці тому +1

    30:45 Bhaiya as I have studied the initializer, condition,updation are option as we can declare the variable out of the for loop too
    eg:-
    1) let i=0
    for(;I>=5;i++){
    console.log(hello)
    }// here variable is initialized before the for loop
    2)let i=0
    for(;I

  • @scientistakasha7293
    @scientistakasha7293 6 місяців тому

    53:20 jab hum string ka variable bnaty hain to wo stack main banta ha jo kay run time sy pehly storage assign hti ha matlab compile time pay.jab hum new keyword use kerty hain to memory heap main banti ha runtime pay aur dusri baat yay kay new string aik string class ka object bnata ha runtime pay jis sy hum us string class ki sari properties ko use ker sken gy

  • @priyanshumathematics8875
    @priyanshumathematics8875 9 місяців тому +1

    Mast ❤

  • @skandpandeyofficial
    @skandpandeyofficial 6 місяців тому

    Samajh aa gaya bhaiya, dosto go for it is good infinity

  • @abhishekojha1823
    @abhishekojha1823 4 місяці тому

    Bhaiya I really love you in a good way ❤️

  • @RajivKumar-zw8tq
    @RajivKumar-zw8tq 9 місяців тому

    Love Bhaiya.. video ke last me..., topic ke related..., kuch practice questions be add kr diya kro ..🌞

  • @balakraj6544
    @balakraj6544 4 місяці тому

    Understood++💯🔥

  • @RajaBijoriya
    @RajaBijoriya 25 днів тому

    What I learn from this lecture.
    1. loops.
    -for loop.
    -while loop.
    -do-while loop.
    - for-in loop.
    -for-each loop.
    -for-of loop.
    2. string.
    3. operation on string.
    - concatenation.
    - length.
    - uppercase.
    - lowercase.
    - substring.
    - split.

  • @sameerhaque5419
    @sameerhaque5419 Місяць тому

    Thank you bhaiyya samjh aaya

  • @pardhakrosuri-j6k
    @pardhakrosuri-j6k 17 днів тому

    superb!

  • @souravsingh8202
    @souravsingh8202 9 місяців тому

    bhaiya sahi padhaya samjh aa rha hai

  • @Nisha_yadav_111
    @Nisha_yadav_111 9 місяців тому

    Js playlist vi strt kr di bhaiya ne 🔥🔥

  • @DiscoveryDepot.
    @DiscoveryDepot. 2 місяці тому

    Thank you❤

  • @yogitasaroha2151
    @yogitasaroha2151 9 місяців тому

    Thanks bhaiya smj aa gya 🎉

  • @GulshanKumar-pf4mq
    @GulshanKumar-pf4mq 9 місяців тому +1

    HW ANSWER
    yes we can use for loops without the any of three conditions but should be the semicolons that maintain the syntax of the for loop
    for(; ; ;){
    }

  • @OmRatnaparkhe
    @OmRatnaparkhe 2 місяці тому

    Very helpful

  • @muhammadnabimuhammadnabi2732
    @muhammadnabimuhammadnabi2732 4 місяці тому

    Amazing sir

  • @mikey_beats
    @mikey_beats 4 місяці тому

    Best Hogya Bhaiya G

  • @dhruva3710
    @dhruva3710 2 місяці тому

    Understood ++
    Respect ++

  • @Manatsaini6384
    @Manatsaini6384 9 місяців тому

    thanks bhaiya for your love and supports for the students🥳

  • @tushargedam8881
    @tushargedam8881 7 місяців тому +1

    understand ++, thank you Bhaiya..

  • @tarunkumar8000
    @tarunkumar8000 9 місяців тому

    Sir Samajh me aa gya 🙂🙂🙂🙂

  • @mansikhatri7841
    @mansikhatri7841 Місяць тому

    Nice tutorial

  • @Bcalovers9532
    @Bcalovers9532 22 дні тому

    Bhaiya aap bahut achha padhate hai

  • @balpreetsinghchahal2013
    @balpreetsinghchahal2013 8 місяців тому

    great learning bro

  • @swagatamprasad9819
    @swagatamprasad9819 9 місяців тому

    Teaching skill you have excellent. Har din video dalo

  • @emtiazahmed5333
    @emtiazahmed5333 9 місяців тому

    30:35
    ============================================
    without any conditions :
    let i = 7;
    for(;;){
    console.log(i);
    }
    This will run without any error and give output infinite 7s
    adding conditions inside loop body
    let i = 1;
    for(;;){
    console.log(i);
    i++;
    if(i >= 7)
    break;
    }
    This will print 1 to 6

  • @ishmeetdhingra4399
    @ishmeetdhingra4399 9 місяців тому

    Hum likh skte for loop without any conditions
    let i = 1;
    for(;;){
    console.log(i);
    }
    This will run without any error and give output infinite 1s
    But we can use for loop by adding conditions inside loop body
    let i = 1;
    for(;;){
    console.log(i);
    i++;
    if(i >= 10)
    break;
    }
    Output 1 to 9
    Answer of 30:35

  • @ShivaniSingh-nb9ox
    @ShivaniSingh-nb9ox 7 місяців тому

    The difference is that when we are{ let firstName="shiavni"; }(This is the normal creation of string ) but when we are create string in this form let name=newString("hello shivani"); in this way it create string in the form of object.

  • @scientistakasha7293
    @scientistakasha7293 6 місяців тому

    30:39
    let a=1;
    for (;a

  • @fit_tubes_365
    @fit_tubes_365 Місяць тому

    Episode - 08 : 04-11-2024
    Episode - 09 : 14-11-2024
    Episode - 10 : 14-11-2024
    Episode - 11 : 19-11-2024
    Episode - 12 : 21-11-2024
    Episode - 13 : 21-11-2024
    Episode - 14 : 22-11-2024
    Episode - 15 : 23-11-2024
    Episode - 16 : 23-11-2024
    Episode - 17 : 23-11-2024
    Episode - 18 : 23-11-2024
    Episode - 19 : 25-11-2024
    Episode - 20 : 26-11-2024
    Episode - 21 : 27-11-2024
    Episode - 22 : 28-11-2024
    Episode - 23 : 29-11-2024
    Episode - 24 : 29-11-2024
    Episode - 25 : 29-11-2024
    Episode - 26 : 30-11-2024
    Episode - 27 : 02-12-2024
    Episode - 28 : 03-12-2024
    Episode - 29 : 03-12-2024
    Episode - 30 : 04-12-2024
    Episode - 31 : 05-12-2024
    Episode - 32 : 05-12-2024
    Episode - 33 : 06-12-2024
    Episode - 34 : 07-12-2024
    Episode - 35 : 08-12-2024
    Episode - 36 : 08-12-2024
    Episode - 37 : 08-12-2024
    Episode - 38 : 09-12-2024
    Episode - 39 : 09-12-2024
    Episode - 40 : 10-12-2024
    Episode - 41 : 11-12-2024
    Episode - 42 : 11-12-2024

  • @shashankdiary1629
    @shashankdiary1629 9 місяців тому

    Babbar bhaiya ek humble request please jaldi jaldi series complete kara dena, placement start hone wale hai or development k naam pe bs lecture 43 tak hi ata h

  • @shreyachaudhary2658
    @shreyachaudhary2658 8 місяців тому

    Thank you so much sir

  • @vnt_grg
    @vnt_grg 9 місяців тому +1

    bhaiya Js ka web dev implementation kitni videos k bd start hoga ?

  • @aakashbankey4035
    @aakashbankey4035 9 місяців тому

    Thanks a lot bhaiji 👍👏 bolne wale to bolte rahte h or kaam hi kya h unka

  • @balpreetsinghchahal2013
    @balpreetsinghchahal2013 8 місяців тому

    thanks for the video

  • @arnavranjan7881
    @arnavranjan7881 9 місяців тому

    sahi padhaya hai samajh mai araha hai
    😁

  • @মুহাম্মদফাইয়াজসালাফি

    yes, its understandable

  • @humanbeing1913
    @humanbeing1913 Місяць тому

    Thanks

  • @achyuttiwari5827
    @achyuttiwari5827 9 місяців тому

    Samajh mai aa rha hai!
    Enhanced for loop se kar sakte hai!

  • @tousifahmdkhn
    @tousifahmdkhn 8 місяців тому

    Thank You Bhaiya

  • @protineshake-r6r
    @protineshake-r6r 4 місяці тому

    please bhaiya aap kaa bahut badaa fan hu
    ghar pe net to hai nhi isiliye saari class road pe baith ke letaa hu please yaar babbar bhaiya laptop bhii kabaade me se liyaa hai

  • @Sanatan_shiksha1
    @Sanatan_shiksha1 9 місяців тому

    Paid course pre recorded h ya live hoga web dev ka

  • @BharatHembram-mx7tj
    @BharatHembram-mx7tj 9 місяців тому +1

    Respect Button for LOVE BABBAR ❤❤❤❤❤❤

  • @ParamShah-mf5ze
    @ParamShah-mf5ze 9 місяців тому

    In for-loop only condition is mandatory
    let i = 0;
    for (; i < 5;) {
    console.log(i);
    i++
    }

  • @saadtariq1199
    @saadtariq1199 5 місяців тому

    kya baat ha babbar bhai

  • @AMITSHARMA-zt4ee
    @AMITSHARMA-zt4ee 9 місяців тому

    Thanks sir for uploading daily videos , please sir be consistent for your youtube army

  • @tejashmaurya2149
    @tejashmaurya2149 9 місяців тому

    mja aa gya
    ✅ Done

  • @simpleshorttrick939
    @simpleshorttrick939 8 місяців тому

    Maza aa gya