In this JavaScript Walkthrough from Learn JavaScript, Functions, Return Statement Explained, on Codecademy, we learn that functions by default return undefined. If we want it to return a value, then it is important that we give our function a return statement. A return statement allows us to return a value from our function. If we create a function without a return value and call the function in a console.log(), then undefined would be logged out. If we give our function a return value, then calling the function in a console.log would log out the return value. Understanding Return Statements in JavaScript is key in developing into a great developer. Make sure to understand how return statements work in JavaScript before moving on. It is helpful in JavaScript, and in many other languages!
On this page of the site you can watch the video online Learn JavaScript, Functions, Return Statement Explained, Codecademy Learn Programming with JS ES6 with a duration of hours minute second in good quality, which was uploaded by the user We Will Code 23 February 2022, share the link with friends and acquaintances, this video has already been watched 726 times on youtube and it was liked by 11 viewers. Enjoy your viewing!