js 自调函数

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>自调函数</title>
</head>
<body>

<script>

(function demo() {
console.log('啊,我被调用了');
})();

 

(function(){
console.log('啊,我也被调用了')
})()


</script>

</body>
</html>

posted @ 2018-08-09 15:33  python成长中  阅读(483)  评论(0编辑  收藏  举报