first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
<script>
// 函数(Function) 事件 写特效(从易到难) 项目前ajaxhttp 写项目...
// 函数 方法
// 作用:封装代码的
// function test() {
// console.log("test");
// }
// 回调 callback
// 异步 编程 获取返回值
// 网络请求
// Promise
// 同步 编程
// let SmsCode = function (callback) {
// let a = 1
// setTimeout(function() {
// a = 100;
// callback(a)
// },3000)
// // arguments 用于参数比较多的情况
// // console.log("test: ", arguments);
// // return true
// }
// SmsCode(function(res) {
// console.log(res);
// });
// 全局作用域
// 局部作用域
// 变量提升
// let test = function () {
// c = 1
// }
// test()
// let test2 = function () {
// console.log("test: ", c);
// }
// test2()
// 闭包
// 函数内部函数访问外部变量的过程
// 作用:缓存数据
// 容易内存泄漏
// let test2 = function () {
// let result = 3;
// let test3 = function (num) {
// result *= num
// return result;
// }
// return test3;
// }
// let res = test2()
// console.log( res(10) );
// console.log( res(30) );
</script>
</html>