Yeah I see what you mean. But let's look around an another example here. It looks similar to the first one, but when you run thΓ program, it can run by anyway (although we don't "return" "multiplication()" inside the "callBack()". )
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.
I am so confused that I don't need to return the "multiplicationTable()" inside "callBack()" to involve the "callBack()" but finally I can receive the result from return of multiplicationTable() @@.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yeah I see what you mean. But let's look around an another example here. It looks similar to the first one, but when you run thΓ program, it can run by anyway (although we don't "return" "multiplication()" inside the "callBack()". )
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 π€
I am so confused that I don't need to return the "multiplicationTable()" inside "callBack()" to involve the "callBack()" but finally I can receive the result from return of multiplicationTable() @@.