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!
In questa pagina del sito puoi guardare il video online Learn JavaScript, Functions, Return Statement Explained, Codecademy Learn Programming with JS ES6 della durata di ore minuti seconda in buona qualità , che l'utente ha caricato We Will Code 23 febbraio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 726 volte e gli è piaciuto 11 spettatori. Buona visione!