Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
All right.
So in the next lesson you're going to tackle the interactive challenge where you have to write the code
and I will check your solutions
behind the scenes.
So this is what you should see.
This is the BMI calculator challenge, and there's a little bit of description about what BMIs are and
what they’re used for.
Now the most important thing is that I've included the formula to calculate the BMI which is the weight
divided by the height squared.
And this is weight in kilograms and height in meters.
So your challenge is to create a function that takes the weight and the height as inputs, like so,
and to be able to give the output, which is going to be equal to the BMI, so that if I run this line
of code using the function that you create, which is going to be called bmiCalculator, I should be able
to get the BMI inside this variable called bmi.
Now, the order of your inputs matter in this case. You’re going to have to put the weight as an input
first and then the height as an input in order to satisfy this line of code.
So you can copy what's inside the index.js file in here, and you can paste it into the Snippets
tool here to write your code and to test your code inside the Chrome Developer Tools and use the console.
So, if you’re here, you can activate this line of code, and try to write your function here, so that when
you console.log your BMI variable, you should be getting the same value back as any BMI calculator online.
Now once you're happy with your function then you can go ahead and click Check solution in order to
check to see if you got it right.
And once you're done then you can go ahead and continue on to the next lesson, where I’ll go through the solution
with you step by step.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.