Best Way to Explain Distinction Between Void vs. Return Functions in JavaScript I am familiar with the concept of void and return methods in Java, and am teaching a course in JavaScript, programming Sphero robots. I think I have the gist of how to explain these concets, but am slightly concerned since I can't find any good examples of NON- return (void) functions used in the JavaScript. It seems that the keyword 'void' is only used to indicate an expression without a return value. The problem is, I need to differentiate between void and return methods/functions since you cannot use an Async function with a return function.

Is this concept of void and return methods in Java analogous to JavaScript as well, or is there a better keyword that I can use to explain the different kinds of functions?

Another thing I would like to explain, is, what if you are calling a function, but you don't know what was coded to create it? Is there a hard and fast rule or way to tell if something is void or return?
A function to perform a procedure often has a void return type. For example:

function foo(a, b, s)
{
    // tell sphero s to go one direction a, another b
}


You are executing a procedure as a side effect and are not returning a computed value.