Hello I'm a beginner at Javascript and I was actually wondering if I made a function like the one below:
function doSomething(){
//does something
}
After creating this function how do I know if the value returned by this function is undefined or not ? I tried the following to solve my problem:
if (doSomething == undefined){//code will do something}
and
if (doSomething){//code will do something}
and
if (typeOf doSomething === undefined){//code will do something}
but none of them worked.
So basically the question is how do I check if the return value of this function is undefined or not. Thanks in advance for the answer!