bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-else-return.js
function naiveHasReturn(node) {
        if (node.type === "BlockStatement") {
            var body = node.body,
                lastChildNode = body[body.length - 1];

            return lastChildNode && checkForReturn(lastChildNode);
        }
        return checkForReturn(node);
    }
function naiveHasReturn(node) {
        if (node.type === "BlockStatement") {
            var body = node.body,
                lastChildNode = body[body.length - 1];

            return lastChildNode && checkForReturn(lastChildNode);
        }
        return checkForReturn(node);
    }
function naiveHasReturn ( node ) { if ( node . type === "BlockStatement" ) { var body = node . body , lastChildNode = body [ body . length - 1 ] ; return lastChildNode && checkForReturn ( lastChildNode ) ; } return checkForReturn ( node ) ; }
Naive return checking, does not iterate through the whole
BlockStatement because we make the assumption that the ReturnStatement
will be the last node in the body of the BlockStatement.

@param {Node} node The consequent/alternate node
@returns {boolean} True if it has a return
Naive return checking does not iterate through the whole BlockStatement because we make the assumption that the ReturnStatement will be the last node in the body of the BlockStatement .