function getCurrentScope(statementType) {
            let currentScope;

            if (statementType === "var") {
                currentScope = functionStack[functionStack.length - 1];
            } else if (statementType === "let") {
                currentScope = blockStack[blockStack.length - 1].let;
            } else if (statementType === "const") {
                currentScope = blockStack[blockStack.length - 1].const;
            }
            return currentScope;
        }
function getCurrentScope(statementType) {
            let currentScope;

            if (statementType === "var") {
                currentScope = functionStack[functionStack.length - 1];
            } else if (statementType === "let") {
                currentScope = blockStack[blockStack.length - 1].let;
            } else if (statementType === "const") {
                currentScope = blockStack[blockStack.length - 1].const;
            }
            return currentScope;
        }
function getCurrentScope ( statementType ) { let currentScope ; if ( statementType === "var" ) { currentScope = functionStack [ functionStack . length - 1 ] ; } else if ( statementType === "let" ) { currentScope = blockStack [ blockStack . length - 1 ] . let ; } else if ( statementType === "const" ) { currentScope = blockStack [ blockStack . length - 1 ] . const ; } return currentScope ; }
Determines the current scope (function or block)
@param  {string} statementType node.kind, one of: "var", "let", or "const"
@returns {Object} The scope associated with statementType
Determines the current scope ( function or block )
Get the current scope of the statement