Afrikaans
Akan
Albanian
Amharic
Arabic
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
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
0 All right. 1
So in the next lesson you're going to tackle the interactive challenge where you have to write the code 2
and I will check your solutions 3
behind the scenes. 4
So this is what you should see. 5
This is the BMI calculator challenge, and there's a little bit of description about what BMIs are and 6
what they’re used for. 7
Now the most important thing is that I've included the formula to calculate the BMI which is the weight 8
divided by the height squared. 9
And this is weight in kilograms and height in meters. 10
So your challenge is to create a function that takes the weight and the height as inputs, like so, 11
and to be able to give the output, which is going to be equal to the BMI, so that if I run this line 12
of code using the function that you create, which is going to be called bmiCalculator, I should be able 13
to get the BMI inside this variable called bmi. 14
Now, the order of your inputs matter in this case. You’re going to have to put the weight as an input 15
first and then the height as an input in order to satisfy this line of code. 16
So you can copy what's inside the index.js file in here, and you can paste it into the Snippets 17
tool here to write your code and to test your code inside the Chrome Developer Tools and use the console. 18
So, if you’re here, you can activate this line of code, and try to write your function here, so that when 19
you console.log your BMI variable, you should be getting the same value back as any BMI calculator online. 20
Now once you're happy with your function then you can go ahead and click Check solution in order to 21
check to see if you got it right. 22
And once you're done then you can go ahead and continue on to the next lesson, where I’ll go through the solution 23
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.