Web Note

console.log()
setTimeout
setInterval

var time = 0;
var timer=setInterval(() => {
    time+=3;
    console.log(time+" sec pass");
    if (time>10)
        clearInterval(timer);
}, 3000);

console.log(__dirname)
console.log(__filename)
回调函数

function CallFunc(Fun, name) {
    Fun(name);
}

var Func = function(name) {
    console.log('Bye '+ name);
}

CallFunc(Func,'Li');

arr=[‘A’,’B’,’C’];
arr.length=3

require(‘./*.js’) 当前目录引用

 

npm run serve

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注