Return Early Pattern for Functions, freeCodeCamp Basic Javascript

preview_player
Показать описание
In this challenge we go over 'return'. When a return statement is reached, the function will stop executing and will return to where it was called.
Рекомендации по теме
Комментарии
Автор

Your videos are very helpful!! Thank you!

Mosae_L
Автор

how do you type in that symbol in between 0 and b

Kanexxable
Автор

Hi, could you tell me why this doesnt work?

if (a | b < 0) {
return undefined;

}

Thanks!

kotel
Автор

can you help me with this? i cant get it

Write a function called "isWeekendDay" that expects a day argument that is a string of a day of the week. For this exercise the days of the week are (the case matters):
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday

This function then returns a boolean value indicating if the day passed in is a weekend day. Weekend days are 'Saturday' and 'Sunday'.

isWeekendDay('Monday') // returns false

alexrz
Автор

somehow when you read the text i understand the question they ask me immediately!

milanm
Автор

Sir this not working?
Look at my code
// Setup
function abTest(a, b) {
// Only change code below this line
if (a < 0 || b < 0){
return undefind;
}


// Only change code above this line

return + Math.sqrt(b), 2));
}

// Change values below to test your code
abTest(2, -2);
sir can you say why not working this code?

khanadnan
visit shbcf.ru