透明性:对于函数传入相同的值,返回相同的结果。 function test(i){ let a =100; return i*100;}错误实例:因为全局变量的存在,传入相同的参数,结果可能不一样。var b =100;function test2(i){ return i*b;}