model1();
function model1() // 函数式声明
{
console.log('model1');
}
model2(); // 报错,不能先调用再声明
const model2 = function model12() // 函数表达式式声明
{
console.log('model2');
};
model2();
model1();
function model1() // 函数式声明
{
console.log('model1');
}
model2(); // 报错,不能先调用再声明
const model2 = function model12() // 函数表达式式声明
{
console.log('model2');
};
model2();