Roman Numeral Converter - Project 2 Javascript Certification FreeCodeCamp

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Almost three years later and this video is still helping people, thanks Yazeed

Caliphus
Автор

Thanks you a lot Yazeed. I'm a teacher, and I can guarantee you have excellent didactic abilities. This helped me pass the challenge!

eugeniopalandri
Автор

i am a beginner but you make me look like a moron. These videos are really helpful

andresramirez
Автор

final code 👇

function convertToRoman(num) {
const lookupTable = {
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
};

let accumulator = ''

for (const key in lookupTable) {
const numberValue = lookupTable[key]

while (numberValue <= num) {
num -= numberValue
accumulator += key;
}
}
return accumulator;
}

letsgobowling
Автор

Yazeed you explain the concept clearly. And that is great.

kyalocharles
Автор

What a teacher you are!!! You must keep making videos man your style is amazing. Loved it <3

shravansingh
Автор

Excellent video! I love that you also, and so clearly, explained how roman numerals work.

jolenekearse
Автор

Thanks a lot. I was stuck in this challenge for long time. Now, I get to know how to solve this algorithm. Great explanation. I needed that.

chetanhaobijamn
Автор

ok i truly love how you explain things. truly.

HeatherHolt
Автор

Excellent video! The logic and explain are very clear! Thank you so much!

mengliu
Автор

To easy when you reveal the whole code solution at the end, but i will try it with the explanation about the numerals by myself first. Thx a lot :)

RealLexable
Автор

You are the best. Thank you so much for your clear explanation.

sudheerkumark
Автор

Thank you for the detailed explanation Yazeed! that helped me a lot!

adnanbugacki
Автор

Thank you. I can look up the answer but the EXPLANATION is what I need!

fabianvillasenor
Автор

with your help, I have built a small app. Thanks

The_Daily_Shorts
Автор

Such an awesome tutorial. Makes everything look easy.

MultiRng
Автор

Thank you! That was a clear explanation i love it.

tachisnofansub
Автор

Thank you for so an explicit explanation!

kubataiupov
Автор

Great tutorial, please keep it up, you should make video on DSA.

nayandwivedi
Автор

what would be the time complexity of this solution I think it would be O(n^2) if i am not wrong

zubairwasti