SOURCE

ok=1
var ok2 = 2;
(function oktest (){
var ok3=3;
ok4 = 4;

})();
console.log(window.ok);
console.log(window.ok2);
console.log(window.ok3);
console.log(window.ok4);
console 命令行工具 X clear

                    
>
console