Это видео недоступно.
Сожалеем об этом.

Javascript Coding Challenge #19: Roman Numeral Converter (Freecodecamp)

Поделиться
HTML-код
  • Опубликовано: 31 июл 2024
  • 🔥 Get my FREE project-based Javascript course, zeeee best Free Javascript course in the world, at www.whatsdev.com!
    *FOLLOW ME!
    ►INSTAGRAM @zinnylives
    ►Business Only: tenzin@whatsdev.com
    MY EQUIPMENT LINKS TO AMAZON
    The mic I use to record my golden voice - amzn.to/2E3bAEq
    The laptop I use to edit my LIT videos - amzn.to/2H00cwx
    The keyboard I use to code - amzn.to/2GRnODr
    The most ergonomic mouse that I use all the time - amzn.to/2NkVWIX
    The best android phone on the market - amzn.to/2TWYbo9
    The camera I use to shoot my awesome videos - amzn.to/2BKC7X2
    My 4K mirrorless camera - amzn.to/2E31WBL
    The best Gaming Desktop - amzn.to/2XgDea7
    The best bang-for-buck 4K UHD IPS Monitor - amzn.to/2U0C7cx
    The best 29" UltraWide Screen LED-Lit Monitor - amzn.to/2GVVoYI
    The memory card I use - amzn.to/2TYawIQ
    My High-Def PRO webcam - amzn.to/2U2jIMy
    The best storage for my ever-growing collection - amzn.to/2NqV85z
    The flash drive I use - amzn.to/2T82PCB
    The best Digital Wireless Microphone - amzn.to/2E2YXJz

Комментарии • 91

  • @alanrichards6367
    @alanrichards6367 2 года назад +9

    I feel like most people just don't have the patience to explain every little detail like this. So, thank you for taking the time to do it.

  • @heyimanh
    @heyimanh 4 года назад +25

    "if it hurts your brain, that's a good sign, because that means you're learning something" amen. thanks for your high quality videos!

  • @tavarespablo
    @tavarespablo Год назад +4

    Thanks a lot for having the patience to explain in such great detail while having a cold!

  • @mygoodshitzzz
    @mygoodshitzzz Год назад +3

    I got to say I really love how you actually take the time to explain the code in detail!!! This is by far the best tutorial on this challenge.

  • @TheBytao7mao
    @TheBytao7mao 6 лет назад +36

    10+++ for explanation again, you have a huge gift for explanations dude ! thanks

    • @whatsdev
      @whatsdev  6 лет назад +2

      Thanks Nicolae! I appreciate it 😃

    • @suraj-ram7488
      @suraj-ram7488 5 лет назад

      Yes definitely

    • @yeetmam3657
      @yeetmam3657 3 года назад

      best explanation 10/10 I just got this karta today and now I understand this

  • @codeitraw5241
    @codeitraw5241 2 года назад +2

    wow.... you are the best at explaining logic. Some people goes on and on for nothing.. I need to definitely join your course.

  • @luizmelo8611
    @luizmelo8611 6 лет назад +7

    Maan this explanation was awesome! The best one I've seen so far. Congrats and thank you!

  • @pooja3711
    @pooja3711 Год назад +2

    i really love your way of explaining the concepts.hatsoff !.For beginners its a key ...

  • @anshulmanapure1980
    @anshulmanapure1980 2 года назад +3

    The explanation and the code were a piece of art.

  • @hartdev05
    @hartdev05 3 года назад +1

    Love the way how you walk us through the code! subscribed! Thanks a lot!

  • @viacheslavpak2394
    @viacheslavpak2394 3 года назад

    Oh my God thank you for the great explanation! I started to learn javascript a week ago, I'm given a assigments to make a function that converts digits into latters...was so lost but this video gave a hint and a better understanding of loops and function! Thank you again!!!

  • @GapBruno360
    @GapBruno360 3 года назад

    Bro this series of videos are gold, thank you so much!

  • @alexlytle089
    @alexlytle089 4 года назад

    THANK YOU SO MUCH. I had to watch this about 10 times but its so clear now

  • @ritai.3089
    @ritai.3089 3 года назад +1

    Damn!! It's PERFECT!! so simple, clear!! Please make more videos!

  • @olivia4788
    @olivia4788 5 лет назад +1

    Thank you!!! I'm going to keep practicing. Great explanation!!

  • @AntNewgen
    @AntNewgen 3 года назад

    Amazing explanation
    Thanks for all of your videos. They're really helping me understand every challenge in Free Code Camp!

  • @mrpotterandrew
    @mrpotterandrew 6 лет назад +6

    oh man that was so simple. i wrote almost 3 pages of code to do what your few lines of code does

  • @horacecarter2081
    @horacecarter2081 5 лет назад

    can you continue to make these videos? i am teaching myself every single one over and over until its ingrained my brain.

  • @jovannikolic6346
    @jovannikolic6346 4 года назад

    That's a great explanation. Thanks!

  • @faisalrana9945
    @faisalrana9945 3 года назад +2

    massive difference between watching someone do this.. and coming up with it yourself.. if you read this.. can you remember if when you were starting out.. something like this seems almost impossible to come up with on your own? im good at understanding things.. i just have trouble with creation sometimes. im in a code camp right now

  • @alexnavarro3221
    @alexnavarro3221 2 года назад

    Thanks a lot guy! this is a perfect and clear explanation

  • @harunaoseni555
    @harunaoseni555 3 года назад

    I had to comment, thank you Tenzin, implementing your solution to my wagon!

  • @abhinavkumar8396
    @abhinavkumar8396 3 года назад

    I was talking your chanel lightly until I understood this great example by you, awesome explanation;👍

  • @Ermosparis
    @Ermosparis 4 года назад

    Best clear solution, simple and efficient

  • @tiffanyvalentina6773
    @tiffanyvalentina6773 3 года назад

    Beautifully and simply composed; excellent and clear explanation. Thank you!

    • @lindatochukwu3081
      @lindatochukwu3081 Год назад

      hey dear, am linda and u? am from Nigeria? can i be your friend? sorry i saw ur comment on youtube channel, are you a developer?

  • @wongtszpong
    @wongtszpong 2 года назад

    Thanks a lot, bro. You save my day.

  • @lindatochukwu3081
    @lindatochukwu3081 Год назад

    i am glad i came across this....thanks alot !!!

  • @aryamol5346
    @aryamol5346 Год назад

    Detailed explanation.. Thank you so much

  • @prathameshmali3888
    @prathameshmali3888 4 года назад

    Very helpful, great explaination.

  • @millerxcrunning
    @millerxcrunning 5 лет назад

    @whatsdev Thanks for the awesome walk through! Can you elaborate on using a for in loop and whether the order of execution is predictable? I was under the impression that for in loops happen in arbitrary order.

  • @apel1151
    @apel1151 2 года назад

    You are an absolutely cool guy!!!!!

  • @AsifKhan-md7jy
    @AsifKhan-md7jy Год назад

    ohhhhh! Mind blowing explanation brother , keep helping students u r doing such a great work stay bless and happy ,and make more videos like this and thank u for this

  • @alexlytle089
    @alexlytle089 4 года назад

    How did you come up with the values you inserted in your key-value pair?? They seem to be random roman numerals descending from 1000

  • @abhishekmagar9843
    @abhishekmagar9843 Год назад

    Wow, how easily you explaining thank you

  • @mobeenrajpoot5315
    @mobeenrajpoot5315 11 месяцев назад

    You are the best!

  • @zathkal4004
    @zathkal4004 3 года назад

    Awesome explanation man.... thanks (:

  • @victortarroni
    @victortarroni Год назад

    Thank you!

  • @burnlastsunday
    @burnlastsunday 3 года назад

    think i need to buy jab-jab-javascript. you are a remarkable teacher and you make everything make sense. zero bullshit 100% results. i expect it will be the hardest thing i've ever done and i'm looking forward to it. let's GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!!!!

  • @tobhiro
    @tobhiro Год назад

    You did a great job

  • @ahmedalruqaishi7312
    @ahmedalruqaishi7312 11 месяцев назад

    thank you so much !

  • @iteachyouleech5939
    @iteachyouleech5939 4 года назад

    What do you think about creating a function that lets you put in lazy numbers e.g IIII, VIIII and regular numbers to convert to Roman numerals?

  • @tiffanychan478
    @tiffanychan478 3 года назад

    Thank you for the video. What is the difference if the key-value starts from I:1 in romanToNum objects?

  • @JJ-ww6pm
    @JJ-ww6pm Год назад

    Thank you 😊

  • @sammalik8170
    @sammalik8170 3 года назад

    Thanks bro❤️

  • @lycan2494
    @lycan2494 5 лет назад +1

    sounds simple but why are the object keys have to be exactly in this pattern to beat the challenge?
    M:1000,
    CM:900,
    D:500,
    CD:400,
    C:100,
    XC:90,
    L:50,
    XL:40,
    X:10,
    IX:9,
    V:5,
    IV:4,
    I:1

  • @sherwinsayo8602
    @sherwinsayo8602 2 года назад

    i like the way you explain

  • @codenjourney6656
    @codenjourney6656 4 года назад

    Just tried with another roman numerals set and it doesn't work. Does it have to be the dataset you showed?

  • @thecapletsecurity7316
    @thecapletsecurity7316 3 года назад +1

    The order in which you defined your object is must otherwise if you shuffle the object value randomly then it never generate the original results eg:- shuffle the whole object in random order and then try for 1000

  • @meenakshichandani
    @meenakshichandani 4 года назад

    very helpful thanks dear

  • @JustinDAMusic
    @JustinDAMusic Год назад +1

    1:24 That's what she said😂

  • @frozen4083
    @frozen4083 6 лет назад +2

    Feel better man!

    • @whatsdev
      @whatsdev  6 лет назад +1

      NoahH Thanks man! Trying lol 😂

  • @tod670
    @tod670 3 года назад

    thanks great content! get better!

  • @scottldn
    @scottldn Год назад

    That’s a nice solution. I used a massive switch statement to pass the test but this is a better option 😅

  • @xnetch2024
    @xnetch2024 2 года назад

    *good explanation*

  • @nouceirnossa634
    @nouceirnossa634 2 года назад

    thank u sooooooooooo much

  • @tuhairweronnie7385
    @tuhairweronnie7385 4 года назад

    Tanzan thanks for the challenges but this last of numerical i only saw stars........ may be i will keep revising and see if i can get it but i think i leaent alot from the challenges. thank man......buy you monster one day

  • @AmanKumar-pb6om
    @AmanKumar-pb6om Год назад

    but what if we do num-9 then how will it print IX

  • @yoyocr2034
    @yoyocr2034 3 года назад

    I am so sad , this beautiful series has no more videos..

  • @ifolkstales7612
    @ifolkstales7612 5 лет назад

    Please I run this same code in repl.it, but it gives me 'undefined', why?
    function convertToRoman(num){
    var romanToNum = {
    M:1000,
    CM: 900,
    D: 500,
    CD: 400,
    C: 100,
    XC: 90,
    L: 50,
    XL: 40,
    X: 10,
    IX: 9,
    V: 5,
    IV: 4,
    I: 1
    };
    var roman = "";
    for(var key in romanToNum){
    console.log(key);
    }
    }

  • @fujiipo
    @fujiipo 2 месяца назад

    tanks dude - brazil is watching y

  • @suraj-ram7488
    @suraj-ram7488 5 лет назад

    Does the order of roman numerals(descending), stored in the romanToNum object, matter?

    • @N1rOx
      @N1rOx 8 месяцев назад

      Yes, because the for in loop will only move in one direction, so the order the roman numerals need to be in must match the way the arabic numerals convert to roman numerals.

  • @dboydomr
    @dboydomr 2 года назад

    Before watching this vid I came up with this. Is there any reason I should have gone the route the video maker went with? My algo beat the challenge but is there room for improvement?
    function convertToRoman(num) {
    function unit(x) {
    switch(x) {
    case 1: return 'I';
    case 2: return 'II';
    case 3: return 'III';
    case 4: return 'IV';
    case 5: return 'V';
    case 6: return 'VI';
    case 7: return 'VII';
    case 8: return 'VIII';
    case 9: return 'IX';
    }}
    function tens(x) {
    switch(x) {
    case 1: return 'X';
    case 2: return 'XX';
    case 3: return 'XXX';
    case 4: return 'XL';
    case 5: return 'L';
    case 6: return 'LX';
    case 7: return 'LXX';
    case 8: return 'LXXX';
    case 9: return 'XC';
    }
    }
    function hun(x) {
    switch(x) {
    case 1: return 'C';
    case 2: return 'CC';
    case 3: return 'CCC';
    case 4: return 'CD';
    case 5: return 'D';
    case 6: return 'DC';
    case 7: return 'DCC';
    case 8: return 'DCCC';
    case 9: return 'CM';
    }}
    function thou(x) {
    switch(x) {
    case 1: return 'M';
    case 2: return 'MM';
    case 3: return 'MMM';
    case 4: return 'MMMM';
    }
    }


    let arr = String(num).split("")
    let arr2 = []
    for (let i=0;i

  • @Rgroose
    @Rgroose 6 лет назад +4

    cool

  • @user-qx7lb5qc9m
    @user-qx7lb5qc9m 4 года назад

    nice

  • @FahadKiani1
    @FahadKiani1 4 года назад

    where is the guitar??

  • @damaroro
    @damaroro Год назад

    what about using hashmap to solve this challange ?

  • @CameronChardukian
    @CameronChardukian 5 лет назад

    Haha just like FunFunFunction. If your brain hurts, it's a good thing -- It means you're learning! Seriously though, thanks for creating this video for us. You explained everything very well!

  • @colose-qw6bh
    @colose-qw6bh 3 года назад

    I just can't get how can someone still unlike that

  • @carminetambascia6355
    @carminetambascia6355 2 года назад

    Would be interesting to come up with a solution without the mapping object

  • @--Dipanshu--
    @--Dipanshu-- 3 года назад

    noted. drink cold water when having cold, with that I can be a developer like him .

  • @RuneSTEMEducation
    @RuneSTEMEducation 2 года назад

    hi i dont know you will read tthis comments or not. anyway. I used your code as solution but it is saying wrong answer

  • @adityachaudari4321
    @adityachaudari4321 2 года назад

    i watched all the tutorials but find really hard to solve any problem and need to see the solution in internet. Do other people also experience this, or just me?

  • @ifteyh.i.raiyan7277
    @ifteyh.i.raiyan7277 2 года назад

    make more videos brother

  • @somnvm37
    @somnvm37 3 года назад

    I still have problems with roman numerals.
    Hoow do you know that XC is not just 10+100, but 100-10?
    Why CC is 100+1000, and not 100-100.

  • @samoh6084
    @samoh6084 3 года назад

    Superb explanation. Kind of distracting though not gonna like I feel like I always need to take some benzodiazepines after watching your videos.

  • @subhamagarwal1665
    @subhamagarwal1665 3 года назад

    1:24 thats what she said

  • @amguruprasath8037
    @amguruprasath8037 5 лет назад

    Here is a simpler solution with single for loop
    function convertToRoman(num) {
    var roman = {
    M: 1000,
    CM: 900,
    D: 500,
    CD: 400,
    C: 100,
    XC: 90,
    L: 50,
    XL: 40,
    X: 10,
    IX: 9,
    V: 5,
    IV: 4,
    I: 1
    };
    var romanNum = "";
    for(key in roman){
    var check = num>=roman[key];
    if(check){
    console.log(romanNum);
    romanNum += key;
    num-= roman[key];
    }
    }
    return romanNum
    }
    convertToRoman(150);

  • @mickpick4678
    @mickpick4678 2 года назад

    "hard and long" lol

  • @AhmedIbrahim-fi2so
    @AhmedIbrahim-fi2so 3 года назад

    worst challengs in the world ! 😂😂😂 ! the problem is not js .. its the problem 😑

  • @dineshrajan6048
    @dineshrajan6048 7 месяцев назад

    Thank you!