Maps and for of loop in javascript

Sdílet
Vložit
  • čas přidán 6. 09. 2024
  • Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.
    All the learning resources such as code files, documentations, articles and community discussions are available on our website:
    chaicode.com/
    You can find our discord link, github link etc on the above website.
    Twitter/X link: x.com/hiteshdo...
    Discord link: hitesh.ai/discord
    Learn React with 10 projects: • Let's learn react from...
    Learn Docker: • A practical guide on D...
    Learn Kubernetes: • Complete Kubernetes Co...
    How does a browser works: • How does a browser wor...
    How nodejs works: • How node JS works | En...
    Learn Redux-toolkit: • Learn Redux Toolkit in...
    Learn NextJS: • Nextjs Full stack course
    Learn Typescript: • Why to learn Typescript
    Learn Javascript: • Welcome to new JavaScr...
    Learn React Native: • React Native Mastery: ...
    Learn Zustand: • React state management...
    Learn Golang: • How to get started wit...

Komentáře • 128

  • @Somsubhra_Das
    @Somsubhra_Das Před 6 lety +9

    Here's the assignment to print the newMap :
    for (const [key, value] of newMap.entries()) {
    console.log(`${key} = ${value}`);
    }
    Loving this course Sir :D
    for (const video of javascript.videos()) {
    console.log(` ${video}`);
    }

  • @niketanchandarana
    @niketanchandarana Před 6 lety +25

    i want to learn everything from you in my whole life... you're the best teacher

  • @mizanurrahmankhan692
    @mizanurrahmankhan692 Před 6 lety +7

    You are my one of the best teacher I have ever found. I will complete all course from your website sequentially. Many many thanks for all of your work for us. Wish you a good and healthy life.

    • @HiteshCodeLab
      @HiteshCodeLab  Před 6 lety +6

      Comments like this keeps me going, even at late night

  • @sukantaghosh3237
    @sukantaghosh3237 Před 4 lety +1

    Sir, Your content is one of the simplest and sorted content in YT. It's really great to learn from you.

  • @ManishSharma-iv9po
    @ManishSharma-iv9po Před 5 lety

    Sir, I was that person who really got afraid when I saw coding seriously I didn't like it . But somehow I want to learn it. The way you teach is really amazing and now I am loving to code. This can happens only because of you. Thanks for such a wonderful content and the best part is the way you teach is amazing.

  • @tannerbarcelos6880
    @tannerbarcelos6880 Před 3 lety

    For anyone wondering: you can also simply do for(const [key,val] of users) console.log(...)

  • @vinayvivids
    @vinayvivids Před 4 lety

    i am learning this course from you sir even it is after two years the information you provide is awesome sir

  • @yevs99
    @yevs99 Před 3 lety

    Sir, The way you explain is topnotch.
    Thanks for you awesome quality videos.
    Boom!

  • @memepinch901
    @memepinch901 Před 3 lety

    finally i understood the concept of map , great video hitesh bro.

  • @user-nm9uk3vf4w
    @user-nm9uk3vf4w Před 4 lety

    Your courses are like food you feel weak when you don't have it
    So keep doing sir we're really enjoying it and god bless you in your entire life ❤️

  • @johng5295
    @johng5295 Před 5 lety

    Thanks in a million. "great teachers are great to find."

  • @paramjeetsingh2901
    @paramjeetsingh2901 Před 6 lety

    I am just loving this series, now i can write my Firebase Cloud Functions using javascript. Thanks for the series Hitesh Sir

  • @sashkaaleksandrova7508
    @sashkaaleksandrova7508 Před 10 měsíci

    Thank you so much for your videos. They help me a lot.

  • @rayanalasow9535
    @rayanalasow9535 Před 4 lety

    You made me understand it much better than I did when I first learned it thank you

  • @mykravtsiv13
    @mykravtsiv13 Před 4 lety

    hey everyone, thanks for video - to the author! I really have no explanation: ??!! what's wrong with these results -Here it happened when for-of loop was being explained. So here it is : when the console.log is used ( in browser console !) and is written this way - in single line: console.log(key + ' = ' + value ); >> RESULT is displayed with 'Object object' > RESULT is same in first line, but OBJECTS in THE 2nd LINE - CAN BE OPENED now. .. What's changed??? Must be some simple thing, but it looks pretty mystic for me, I meet this ALWAYS in BROWSER's console...And this is NOT just a useless thing !!! - I have always to write all console.logs in TWO lines - everywhere when checking code ! It is so many additional loines! Any ideas ?...

  • @mandanprasad6526
    @mandanprasad6526 Před 6 lety

    We are learning JavaScript in very deep and I am enjoying it very much😃

  • @animeshsingh2880
    @animeshsingh2880 Před 6 lety

    The manner in which map was taught is awesome Sir although its complex topic

  • @mohitkarkar8774
    @mohitkarkar8774 Před 6 lety

    //assignment one litterate valeues
    for (const [key,value] of users.entries()) {
    console.log(key + ' =' , value)
    }
    var arrOfarr = [['one',1],['two', 2],['three', 3]]
    var newMap = new Map(arrOfarr)
    console.log(newMap)
    //this is simple assignment itret vallues from array of array
    for (const [key,value] of arrOfarr.entries()) {
    console.log(key + ' =' , value)
    }

  • @someshmahajan7903
    @someshmahajan7903 Před 3 lety

    I love this series...

  • @udaypavan4654
    @udaypavan4654 Před 5 lety

    At last, what you told , converting arrofarr to map will only work for if we give only two elements in each array(out of which first one is key and second one is value). Of-course map is considering only second element in array as value. It's not bothering about third and so on. Am I right ??

  • @shubhamkumarsingh8224
    @shubhamkumarsingh8224 Před 6 lety

    oooohhhooo .... One more lesson to learn Befor sleep.......... thanks for updating this course sir ......... love your video in Js ..........

  • @amanshelar7987
    @amanshelar7987 Před 5 lety +2

    let Mymap = new Map(arryofarry)
    for([key , value] of myMap.entries() {
    console.log( `${value} = ${key}` )
    }

  • @hasanfardous
    @hasanfardous Před 5 lety

    You are doing really good. I'm watching and enjoying a lot. Thanks for your effort.

  • @koushithb.r3984
    @koushithb.r3984 Před 6 lety +13

    Nights are more productive than days... I'm I right, sir??😁😁❤️

  • @sahujiofficial7834
    @sahujiofficial7834 Před 5 lety

    Fall 🍁🍂 in love with with your all course videos
    But have fear about Linux installation... 🙁 thank u again sir and looking for all upcoming free video courses series u tell everyone why we should and to what learn..

  • @Goku-ir3pl
    @Goku-ir3pl Před 5 lety

    For those who are wondering about previous vidoes which are not in playlist
    They are in learncodeonline JAVASCRIPT course . I also find after some times

  • @DormantIdeasNIQ
    @DormantIdeasNIQ Před 4 lety

    It is sad that the NOSQL setups are going to become obsolete. They are a bad idea gone bad.
    Go to SQLite instead.
    I cannot remember the article that cleared this up, but it left no doubt.

  • @Mrkafirr
    @Mrkafirr Před 4 lety

    Thanks a lot sir

  • @gouravkhator
    @gouravkhator Před 5 lety

    Best videos ever in youtube

  • @rahulmotwani1071
    @rahulmotwani1071 Před 6 lety

    The series is getting me involved i have switched to js from java.I want to learn react native for that i need to learn about class i think this is the best tutorials.If you have can you please create a tutorial for react native.

  • @subhranil764
    @subhranil764 Před 6 lety +1

    You make it super easy😊

  • @vikillakkavatri4070
    @vikillakkavatri4070 Před 6 lety +1

    Yes sir, its really help me thanks sir .

  • @aadityashrivastava8105

    Another great video of your Awesome JS Tutorial series. I am in love with this series. Great work and keep it up 👌🏻🤘🏻.

  • @bedantabhaumik6888
    @bedantabhaumik6888 Před 6 lety +1

    Sir I am student from Android development of learn code online. Sir can u add some videos in ur course showing the clone of any other famous or great apps

  • @sudhanshurajbhar9635
    @sudhanshurajbhar9635 Před 5 lety

    Enjoying the series .... Thanks a lot sir

  • @priyankapandey3733
    @priyankapandey3733 Před 5 lety

    Wow the way you teach is awesome👍

  • @9895322763
    @9895322763 Před 5 lety

    Fabulous sound clarity 😍

  • @muhammaddanialtanoli
    @muhammaddanialtanoli Před 5 lety

    Amazing stuff i really enjoy this. Love from Pakistan

  • @anjanidhiman
    @anjanidhiman Před 6 lety

    It's too good, but sir if you tell us how to use maps in real projects, then it will become really helpful.

  • @sharmangaria
    @sharmangaria Před 6 lety

    And your video also lovely and your language mindbloin

  • @sonamkumawat6088
    @sonamkumawat6088 Před 4 lety

    thank you so much, sir

  • @nagendrarajas6426
    @nagendrarajas6426 Před 5 lety +3

    error handling video is missing , could you add that please?

  • @msangicyprian1276
    @msangicyprian1276 Před 5 lety

    good teacher

  • @sairamprabhu9712
    @sairamprabhu9712 Před 4 lety

    Good and thanks a lot

  • @ManishSharma-iv9po
    @ManishSharma-iv9po Před 5 lety +1

    Sir, the thing which I found that can it be possible to cut down the price of the courses because as a student it is really difficult to manage that cost. Please if possible to do may be it can be better for everyone.

  • @siddharthsingh2859
    @siddharthsingh2859 Před 4 lety

    thankyou so much bhaiya

  • @bhagyeshwadhale8101
    @bhagyeshwadhale8101 Před 7 měsíci

    Hi sir... Can you make one real time project based on Java script & node

  • @riefkymaulana9040
    @riefkymaulana9040 Před 6 lety

    is the assignment 'convert the above line in literals ' means that we explain how the code work with our words?

  • @prasannakumarz
    @prasannakumarz Před 5 lety

    im also learning some good english.thanx a lot

  • @aamirsayani7101
    @aamirsayani7101 Před 6 lety

    Yes we love this series sir

  • @hirengohil9173
    @hirengohil9173 Před 5 lety

    Superb Job Bro...fabulous!

  • @karuturisumanth6468
    @karuturisumanth6468 Před 4 lety

    Yeah! love this series alot .

  • @sujitkumarborse8051
    @sujitkumarborse8051 Před 5 lety

    Thanks for such good video

  • @chinmaydas1946
    @chinmaydas1946 Před 6 lety

    We love this series

  • @SayJee
    @SayJee Před 4 lety

    thank you Muta.

  • @krishubisht
    @krishubisht Před 4 lety

    thank you so muchhh sir

  • @muthukumar.s8647
    @muthukumar.s8647 Před 5 lety

    can anyone explain how to iterate an dictionary object which contains multiple dictionary in it.

  • @yuganshdwivedi4331
    @yuganshdwivedi4331 Před 6 lety

    Please start up a series based on python Django flask and data science. You are doing an amazing job teaching to code . Thank you :)

  • @rhimanshu6288
    @rhimanshu6288 Před 4 lety

    I am getting this error while assigning key value to empty map "Cannot read property 'set' of undefined"

  • @balanaguharshavardhan3725

    Really loving it! Keep it going!

  • @sarthak_parashar
    @sarthak_parashar Před 5 lety

    Sir plzz tell how to serve army as an ethical hacker.. And what course is required

  • @nitishbahl4072
    @nitishbahl4072 Před 5 lety

    why are we using const in for of loop?

  • @hardik.motwani
    @hardik.motwani Před 5 lety

    Even if i use newMap instead of newMap.entries(), i am getting the same result, So what is the need for entries()?? Please explain me
    var arrofArr = [['One', 1], ['Two', 2], ['Three', 3]]
    var newMap = new Map(arrofArr)
    console.log(newMap)
    for (const [key, value] of newMap.entries()) {
    console.log(`${key} = ${value}`)
    }

  • @gauravrai8377
    @gauravrai8377 Před 5 lety +2

    Sir the video of exception handling is missing. . .
    If possible, upload that too please

    • @abhishekkushwaha8821
      @abhishekkushwaha8821 Před 4 lety

      For the upcoming learners you can search for "exceptional handling in javaScript by Hitesh Chaudhary" seperately on youtube.

  • @sudhanshuuniyal5737
    @sudhanshuuniyal5737 Před 5 lety

    Superuub..

  • @vineetbramhankar8099
    @vineetbramhankar8099 Před 5 lety

    Can anybody tell me how can someone populate a map in runtime.
    I have a usecase such that i am taking data from input texts from a form and i want to insert them in a map datastructure.

  • @crazyfm6312
    @crazyfm6312 Před 6 lety +1

    sir please start a new playlist about php coding.

  • @Imranbof
    @Imranbof Před 4 lety

    I like that

  • @georgenjue7197
    @georgenjue7197 Před 5 lety

    Am from Kenya thanks a lot am I right on the assignment on this specific assignment ? my solution is newMap.forEach((value, key) => console.log(key + ' = ' + value.name));

  • @neonemesis8055
    @neonemesis8055 Před 6 lety +1

    Shit! i got confused at forEach loop. Now, i have to go and watch previous videos ;-;

  • @WeeMan277
    @WeeMan277 Před 5 lety

    Dude you're awesome!

  • @pruthvirajchandorikar9275

    Good job bro !!!

  • @mahmoodkashmiri
    @mahmoodkashmiri Před 6 lety

    Sir amazing ...

  • @hardik.motwani
    @hardik.motwani Před 5 lety

    sir where is video of iterators and generators? Is that in this series

  • @neonemesis8055
    @neonemesis8055 Před 6 lety

    please do provide the way to use those shortcut tools like multi-cursor and other cool stuff :)

    • @rehandev7833
      @rehandev7833 Před 6 lety +1

      Hey Anshu Joshi, for multi-cursor hold the ctrl key and click on the area where you want it. That's it

  • @nguyenquan4836
    @nguyenquan4836 Před 5 lety

    Cool. can you make more advanced lessons ?

  • @AjaySharma-pk5sc
    @AjaySharma-pk5sc Před 4 lety

    Enjoy

  • @priyankapandey3733
    @priyankapandey3733 Před 5 lety

    Please make tutorials on angular 4 or higher 🙌

  • @ruhankhandaker5198
    @ruhankhandaker5198 Před 6 lety

    var arrofArr = [['one', '1'],['two', '2'],['three', '3']];
    var newMap = new Map(arrofArr);
    for ([key, value] of newMap.entries()) {
    console.log(`${key} = ${value}`);
    }

  • @amitnegi6493
    @amitnegi6493 Před 6 lety

    var arrofArr = [['one', 1], ['two', 2], ['three', 3]]
    var newMap = new Map(arrofArr)
    console.log(newMap.keys())
    This prints all the keys like 'one' 'two' 'three' but when i try console.log(`${newMap.keys()}`) it rather prints [object map itreator]. Can you please tell me why?
    These are some log statements that does not print valuable information:
    console.log(newMap.keys() + ' = ' + newMap.values());
    console.log(`${newMap.keys()} = ${newMap.values()}`);
    Explanation Required for these statements too.

    • @Rishabhgupta-cz7ym
      @Rishabhgupta-cz7ym Před 6 lety

      you have to use for of loop for printing each iterator, just try this it will work ---
      var arrofArr = [['one', 1], ['two', 2], ['three', 3]]
      var newMap = new Map(arrofArr)
      for(const [key, value] of newMap.entries()){
      console.log(key + ' = ' + value);
      console.log(`${value}`)
      console.log(`${key} = ${value}`);
      }

  • @yangyangcui9150
    @yangyangcui9150 Před 5 lety

    Thank you :)

  • @abhayrajsingh777
    @abhayrajsingh777 Před 5 lety

    you have not uploaded try catch video in the series.....please upload it

  • @mohinijadhav5985
    @mohinijadhav5985 Před 5 lety

    Hey where is your try catch session ???
    in your ../01advance folder there is one more file for trycatch.js
    where is that session

    • @hardik.motwani
      @hardik.motwani Před 5 lety

      complete list of video is available on Learncodeonline website, you will find all videos there

  • @amishaa9555
    @amishaa9555 Před 6 lety +1

    can someone please tell me what does he mean by string literals!!!! like i cannot understand his assignment properly

    • @prasoonpandey1184
      @prasoonpandey1184 Před 6 lety +1

      Me too :/

    • @riefkymaulana9040
      @riefkymaulana9040 Před 6 lety

      maybe we explain how the code work with our words

    • @chetangupta8806
      @chetangupta8806 Před 5 lety

      string literal is the string value which is stored

    • @hometv4061
      @hometv4061 Před 3 lety

      “Literal” simply means that it's the value itself, rather than a variable. ... For example: const dog = 'Santa's Little Helper'; Santa's Little Helper is a string literal, whereas dog isn't.

  • @rahulmadhavi5401
    @rahulmadhavi5401 Před 6 lety

    I like for each loop dan for of..

  • @georgenjue7197
    @georgenjue7197 Před 5 lety +1

    Aww my correction newMap.forEach((value, key) => console.log(key + '=' + value));

  • @havefun330
    @havefun330 Před 5 lety

    enjoyed

  • @mujtabam265
    @mujtabam265 Před 6 lety +1

    Sir the previous video is not in the playlist.
    😕😕😕

  • @harshit741
    @harshit741 Před 5 lety

    where is try and catch tut?

  • @sumitrabaskey6379
    @sumitrabaskey6379 Před 6 lety

    👍

  • @proudiamindian5952
    @proudiamindian5952 Před 6 lety

    And one how to make app with java

  • @user-dl6et4cn9w
    @user-dl6et4cn9w Před 5 lety

    Can anyone plz explain or share assignment

  • @amolacharya5342
    @amolacharya5342 Před 5 lety

    what is string literals?

  • @priyanshvatsal9791
    @priyanshvatsal9791 Před 6 lety

    learning a loot

  • @abhijeetraj7952
    @abhijeetraj7952 Před 6 lety

  • @proudiamindian5952
    @proudiamindian5952 Před 6 lety

    How to make games like a GTA,Shadow gun etc

  • @nocode659
    @nocode659 Před 6 lety

    Why no Saturday live bro?

    • @HiteshCodeLab
      @HiteshCodeLab  Před 6 lety

      I am working on this series and little busy with personal stuff :)

  • @krishnakalyan3213
    @krishnakalyan3213 Před 6 lety

    Sir make videos. On dark web

  • @sourabhpruthi3618
    @sourabhpruthi3618 Před 6 lety

    please add videos at a faster pace

    • @HiteshCodeLab
      @HiteshCodeLab  Před 6 lety

      These videos takes time to prepare content, putting up best possible example, recording, editing and publishing.
      Also my goal is that students should be able to repeat what I am doing.

  • @parthsoni8353
    @parthsoni8353 Před 4 lety

    sir hindi mai ku6 kijiye na