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!
Auf dieser Seite können Sie das Online-Video Learn JavaScript, Functions, Return Statement Explained, Codecademy Learn Programming with JS ES6 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer We Will Code 23 Februar 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 726 Mal angesehen und es wurde von 11 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!