Front end developer specialising in JavaScript and React. Experienced in all aspects of modern front end development. Passionate about making accessible, secure and performant software.
Front end developer specialising in JavaScript and React. Experienced in all aspects of modern front end development. Passionate about making accessible, secure and performant software.
Sorry but I don't fully understand just from the description. Did you have a link to the code? :)
Oh sorry. Here is the link: repl.it/@doHoangKhanh121/StrikingU...
So in this program we're not receiving results or returning anything. We're only printing to the terminal because we use
console.log
.Printing to the terminal and returning a result are separate things. One uses
console.log
and the other usesreturn
.In this program, we print to the screen on line 7 where we have console.log(
${num} * ${i} = ${num * i}
)But we never return anything, so on line 17, if we do:
For an example of how
return
works please see my previous reply :).Hope that helps :)
Yep. That really helps me to know more about "return" in function. Thank you very much π€