diff --git "a/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\270\200\346\254\241 2022.10.13/1.html" "b/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\270\200\346\254\241 2022.10.13/1.html" new file mode 100644 index 0000000000000000000000000000000000000000..09345ee9062042575bc73b159c451c99351ec38a --- /dev/null +++ "b/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\270\200\346\254\241 2022.10.13/1.html" @@ -0,0 +1,72 @@ + + + + + + + Document + + + +

作业

+ + + diff --git "a/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\270\200\346\254\241 2022.10.13/\346\225\260\346\215\256\347\261\273\345\236\213\357\274\232.md" "b/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\270\200\346\254\241 2022.10.13/\346\225\260\346\215\256\347\261\273\345\236\213\357\274\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..6ff60950afa9a8393b83c3977707ad74d7348dcf --- /dev/null +++ "b/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\270\200\346\254\241 2022.10.13/\346\225\260\346\215\256\347\261\273\345\236\213\357\274\232.md" @@ -0,0 +1,12 @@ +#### 数据类型: + +(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/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\272\214\346\254\241 2022.10.14/\346\225\260\346\215\256\347\261\273\345\236\213.html" "b/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\272\214\346\254\241 2022.10.14/\346\225\260\346\215\256\347\261\273\345\236\213.html" new file mode 100644 index 0000000000000000000000000000000000000000..e32918935101c11909e30095395bf1668c323cd6 --- /dev/null +++ "b/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\272\214\346\254\241 2022.10.14/\346\225\260\346\215\256\347\261\273\345\236\213.html" @@ -0,0 +1,64 @@ + + + + + + + 555 + + + + + + \ No newline at end of file diff --git "a/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\272\214\346\254\241 2022.10.14/\346\225\260\346\215\256\347\261\273\345\236\2132.md" "b/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\272\214\346\254\241 2022.10.14/\346\225\260\346\215\256\347\261\273\345\236\2132.md" new file mode 100644 index 0000000000000000000000000000000000000000..0a99544e0f28fe5957e4b43bfb97957b4a2e11e2 --- /dev/null +++ "b/33\347\275\227\346\255\244\344\270\234/\347\254\254\344\272\214\346\254\241 2022.10.14/\346\225\260\346\215\256\347\261\273\345\236\2132.md" @@ -0,0 +1,22 @@ +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 \ No newline at end of file