<!DOCTYPE html><html><head><meta charset="UTF-8"><title></title></head><body><script type="text/javascript">//第1题 作用域var num1 = 55;var num2 = 66;//100function f1(num, num1) {// var num =55;// var num1 = 66;num = 100;//100num1 = 100;//100num2 = 100;//100console.log(num);//100console.log(num1);//100console.log(num2);//100}// 55 66f1(num1, num2);console.log(num1);//55console.log(num2);//100console.log(num);// 报错</script></body></html>
运行结果