#37 How to use JS return | JavaScript Full Tutorial

preview_player
Показать описание
Let's learn all about the function return keyword, what is it used for? In this lesson we continue our JS tutorial by looking at the function return keyword and it's use.

0:00 - Intro
0:25 - What is the return keyword?
2:19 - Using multiple returns
4:20 - Lesson Summary
5:07 - Lesson Tasks
8:03 - Outro and what's up next

------------------

------------------

------------------
Learn with Dev Dreamer! Step by step, easy to understand tutorials :-)
Рекомендации по теме
Комментарии
Автор

Hey guys don't forget, give the video a THUMBS UP! 🙂👍

DevDreamer
Автор

Love that there is a task included in this video, makes for great practice!

fareenah
Автор

Three days into learning JavaScript (after getting to an intermediate-ish level in HTML and CSS), I really couldn't understand the purpose of the 'return' statement in a function. This video finally helped it make sense to me, thanks for the thorough explanation and the tasks helped massively too.

SomeGamerNoob
Автор

I've been trying to understand it for over an hour but all the other videos just weren't clear enough. Thank you for this video. It really helped me wrap my head around what return actually does

Boyyyyaan
Автор

Very clear explanation of return, by far tthe video that I understand the most.

eggxecution
Автор

i love how you give us a lot of expensive knowledge, im so lucky found this channel❤❤❤

Faisqll
Автор

Thank you for explaining this in laymen terms, I finally understand how to use return function! <3

SirenOfCode
Автор

Great content! You’re doing a great job. Definitely earned a sub❤️

susboi
Автор

Perfect!!! I just watched another tutorial and wanted to rip my hair out. You are clear, smooth and beautiful!!!

bryallen
Автор

Thanks a lot for your awesome explanation.

muhammad_pulok
Автор

For the first practice question, I can get the same output by the below input, could you please advice if that works?

function favNum(num) {
return("My fav number is " + num);
}
favNum(7);

erikaz
Автор

You did not just include tasks too?!?!? THANK YOU!

Tom-xygb
Автор

Which vs code theme you use please tell

blizzards-yt
Автор

Hey man thanks for the clear explanation, by the way any chance to know which theme you are using in VS code (in this video)? :p

johnnyholiday
Автор

whats worng here whenever i type any thing inside fun its show undefined why
let fun = function (pass) {
if(pass === "test123"){
return "sucessfull";

}else {
return "unsecessfull";
}
};

console.log(fun(t))

arthabhunter
Автор

i need this so bad i cannot sleep without knowing return statement

rudythorns
Автор

Hey Amit!
How are you doing!
It would be great if you upload some videos regarding "Responsive" websites or may be a crash course.
You've had uploaded Media Queries before but kindly elaborate the Responsiveness a lil more.
Thanks 💚

xitefy
Автор

Great video, and the task is a great practise tool a well.

Still, there is no difference in the result, if we use Return or we do not in the second task. Console logs the same thing. Getting frustrated a bit

rolandskreslins
Автор

Hi there, i tried this code instead and it also still works:

const favNum = num => {
console.log(`My fav number is ${num}`)
}

favNum(9)

so in general, can we say that return is not always required in a function? i still dont get the idea of why we should use return, would be great if there is some enlightment about it. thanks

andre-urlf