正文JS中函数定义和使用顺序IP云V管理员/2022-12-02/2 阅读 12/02提示:扫一扫查出行【扫一扫了解最新限行尾号】复制提示 在js中如果定义函数是先声明函数,如: console.log(hello); //然后再去定义: function hello(){ alert("Hello");} 这种是可以的(函数语句) 而:consloe.log(hi); var hi =function(){ alert('hi');} 这种是不行的(表达式)