#37 How to use JS return | JavaScript Full Tutorial

  Рет қаралды 23,955

Dev Dreamer

Dev Dreamer

Күн бұрын

🙂 SUBSCRIBE - hit the bell 🔔 and choose all: goo.gl/nYLZvz
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
------------------
👍 HTML FULL TUTORIAL: shorturl.at/fiCMV
👍 CSS FULL TUTORIAL: shorturl.at/clGSZ
------------------
FACEBOOK: / devdreamercode
TWITTER: / devdreamercode
SUBSCRIBE and hit the BELL NOTIFICATION 🔔: goo.gl/nYLZvz
------------------
Learn with Dev Dreamer! Step by step, easy to understand tutorials :-)

Пікірлер: 40
@DevDreamer
@DevDreamer 2 жыл бұрын
Hey guys don't forget, give the video a THUMBS UP! 🙂👍
@fareenah
@fareenah 2 жыл бұрын
Love that there is a task included in this video, makes for great practice!
@SomeGamerNoob
@SomeGamerNoob Жыл бұрын
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.
@user-zf8lj8yh6t
@user-zf8lj8yh6t Жыл бұрын
The same. Can you explain it to me in simple words?
@eggxecution
@eggxecution Жыл бұрын
Very clear explanation of return, by far tthe video that I understand the most.
@DevDreamer
@DevDreamer Жыл бұрын
Thank you! 😀
@felipegud951
@felipegud951 7 ай бұрын
best return explanation ever
@SirenOfCode
@SirenOfCode Жыл бұрын
Thank you for explaining this in laymen terms, I finally understand how to use return function!
@DevDreamer
@DevDreamer Жыл бұрын
Thanks for watching! And for the kind comment, really appreciate it, glad it was helpful 👍
@Faisqll
@Faisqll Жыл бұрын
i love how you give us a lot of expensive knowledge, im so lucky found this channel❤❤❤
@susboi1704
@susboi1704 Жыл бұрын
Great content! You’re doing a great job. Definitely earned a sub❤️
@michaeljoseph4772
@michaeljoseph4772 Жыл бұрын
thank you! excellent tutorial.
@mindblown9365
@mindblown9365 Жыл бұрын
Very excellent explanation.
@muhammad_pulok
@muhammad_pulok 5 ай бұрын
Thanks a lot for your awesome explanation.
@chandkhan-cn5jn
@chandkhan-cn5jn Жыл бұрын
Awesome 👍
@Tessia-ERALITH73
@Tessia-ERALITH73 Жыл бұрын
Thank you
@kiranshet9260
@kiranshet9260 Жыл бұрын
tanks bro
@amansoni2992
@amansoni2992 2 жыл бұрын
👍👍👍👍👍👍👍👍👍
@rudythorns8411
@rudythorns8411 Жыл бұрын
i need this so bad i cannot sleep without knowing return statement
@Tom-xy9gb
@Tom-xy9gb Жыл бұрын
You did not just include tasks too?!?!? THANK YOU!
@DevDreamer
@DevDreamer Жыл бұрын
You’re welcome! 🙂👍
@erikaz6934
@erikaz6934 3 ай бұрын
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);
@ubaid_beast4520
@ubaid_beast4520 Жыл бұрын
what theme do u use in vs code
@johnnyholiday1150
@johnnyholiday1150 Жыл бұрын
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
@NisYT
@NisYT Жыл бұрын
Hey this theme is Atom One Dark, with some edits to the some of the colours, darker background, brighter greens etc. - Stole his comment he posted it down there.
@johnnyholiday1150
@johnnyholiday1150 Жыл бұрын
@@NisYT thanks
@xitefy
@xitefy 2 жыл бұрын
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 💚
@DevDreamer
@DevDreamer 2 жыл бұрын
Hey brother, I've got some plans for something like that very soon 😎
@blizzards-yt9847
@blizzards-yt9847 2 жыл бұрын
Which vs code theme you use please tell
@DevDreamer
@DevDreamer 2 жыл бұрын
Hey this theme is Atom One Dark, with some edits to the some of the colours, darker background, brighter greens etc.
@arthabhunter
@arthabhunter 10 ай бұрын
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))
@TheFausto92
@TheFausto92 10 ай бұрын
you have to use the "" sign, when you write the t in the console.log("t") because it's a string.
@rolandskreslins
@rolandskreslins Жыл бұрын
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
@arthabhunter
@arthabhunter 10 ай бұрын
is this enough??
@mraloush8959
@mraloush8959 Жыл бұрын
fix your loud microphone please
@DevDreamer
@DevDreamer Жыл бұрын
Hi there, thanks for watching but if you are finding it difficult because of the audio, feel free to go elsewhere 👍 hope you get the help you need
@magickomchanell4556
@magickomchanell4556 5 ай бұрын
​@@DevDreamer🤣
@andre-ur6lf
@andre-ur6lf 5 ай бұрын
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
@DevDreamer
@DevDreamer 5 ай бұрын
Hi there, so the reason why the arrow function works, is because it has implicit return, return is built into it. We use return to make the function easier to call, so rather than saying console log over and over again outside of the function whenever we want to call it, inside the function we simply specify what we want returned, I.e. console log.
@andre-ur6lf
@andre-ur6lf 5 ай бұрын
@@DevDreamer thank you for the explanation
#38. How to use Var, Let and Const | JavaScript Full Tutorial
8:50
#34 What are JS Functions? | JavaScript Full Tutorial
13:52
Dev Dreamer
Рет қаралды 13 М.
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 466 М.
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 81 МЛН
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 33 МЛН
#41 What is the 'this' keyword? | JavaScript Full Tutorial
12:42
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Software Developer Diaries
Рет қаралды 71 М.
JavaScript Function - What's your Function?
12:27
Fireship
Рет қаралды 180 М.
#45 What is the Rest Parameter? | JavaScript Full Tutorial
10:08
Dev Dreamer
Рет қаралды 4,7 М.
#39 Understanding JavaScript Scope | JavaScript Full Tutorial
16:11
Функции в JavaScript. 2021. Создание, вызов, работа с переменными, счетчики
35:05
WebDev с нуля. Канал Алекса Лущенко
Рет қаралды 95 М.
Functions in Python are easy 📞
10:38
Bro Code
Рет қаралды 409 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,1 МЛН
#42 Using Call, Apply and Bind | JavaScript Full Tutorial
12:02
Dev Dreamer
Рет қаралды 8 М.
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 466 М.