So I have 2 functions like
var a = function () {
// returns something or returns nothing}
var b = function () {
//call a() here and return value returned from a() if a() returns something, else continue with execution of b()}
I know I can have a variable store returned value and use it but what is the simplest way to do this?
It won’t distinguish the
undefinedthat results fromfrom the
undefinedthat results frombut if you know
a()always returns a value besidesundefinedwhen it intentionally returns a value you can rely on!== undefined.