diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232.html" "b/16\345\210\230\346\260\270\346\275\230/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232.html" new file mode 100644 index 0000000000000000000000000000000000000000..e1fe0583787c752760cc872923497728d7aeff22 --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232.html" @@ -0,0 +1,59 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\347\254\224\350\256\260.md" "b/16\345\210\230\346\260\270\346\275\230/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..575854f75a67cd88752350c6ad324b1c1ca1ec6b --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-13\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232js\345\237\272\347\241\200/2022-10-13\347\254\254\344\270\200\346\254\241\347\254\224\350\256\260.md" @@ -0,0 +1,7 @@ +数据类型:(1)原始型:number,Boolean,string (2)引用型:数组array,对象Object,函数function +如何弹窗输出:alert(typeof a) +如何弹窗输入:var name = prompt('请输入一个名字') +打印在控制台:var a = 5; console.log(a) + 三元运算符 (表达式) ? 满足的时候执行 : 不满足的时候执行 var a = 90 var result = (a >= 90) ? '优秀' : '良好'; console.log(result); + 条件运算 if(1表达式:结果是布尔类型){ }else if(2表达式:结果是布尔类型){ }else{ } while : 1.起始值 2.满足循环的条件:true:可以执行循环体 false:跳出该循环 3. 循环体 4.迭代因子 var sum = 0 while (start <= 100) { //2.终止条件 // sum = sum + start; // if (start % 2 != 0) { // sum = sum + start; // } // + 4.迭代因子 //2.continue:跳出当前循环 \ No newline at end of file diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232\346\225\260\346\215\256\350\275\254\346\215\242/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232.html" "b/16\345\210\230\346\260\270\346\275\230/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232\346\225\260\346\215\256\350\275\254\346\215\242/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232.html" new file mode 100644 index 0000000000000000000000000000000000000000..d5c618876995e514c281a888e5c633732aaca36b --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232\346\225\260\346\215\256\350\275\254\346\215\242/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232.html" @@ -0,0 +1,54 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git "a/16\345\210\230\346\260\270\346\275\230/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232\346\225\260\346\215\256\350\275\254\346\215\242/2022-10-14\347\254\254\344\272\214\346\254\241\347\254\224\350\256\260.md" "b/16\345\210\230\346\260\270\346\275\230/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232\346\225\260\346\215\256\350\275\254\346\215\242/2022-10-14\347\254\254\344\272\214\346\254\241\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..6eaec745200fb2ddee87cdda24edfe5a4c1ff158 --- /dev/null +++ "b/16\345\210\230\346\260\270\346\275\230/2022-10-14\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232\346\225\260\346\215\256\350\275\254\346\215\242/2022-10-14\347\254\254\344\272\214\346\254\241\347\254\224\350\256\260.md" @@ -0,0 +1,21 @@ +1.Switch +2.基本数据类型: number , boolean, string, null , undefined + var a = '5'+1 // + 其中有一个是字符串, 默认是字符串的连接 + var a = '5' // + var b = a*2 // + - * 、 %隐式类型转化 + var b = -a + console.log('类型:' + typeof b + '值:' + b);//查看数据是什么类型 +3.显示数据类型 +NaN : 非数 number +Number():转换成数字,失败会变成 NaN +false:0 true:1 null:0 undefined:NaN + +parseInt(a,radix): 将(radix)进制 转成 10进制 +//var a = 'F' //-->0 1 2 3 4 5 6 7 8 9 A B C D E F +//var b = parseInt(a,16) + +String():转成字符串 +toFixed(n):保留小数点后n位 +a.toString(radix):将十进制数的a转换成radix进制的数 +isNaN(): 是不是非数,是数字的话--》false 不是数字--》true +Math: 舍入 ceil(向上取整) floor(向下取整) round(四舍五入) \ No newline at end of file