摘要:
1. 函数 function addNums(num1=1,num2=2) { console.log('num1 + num2:',num1 + num2); return num1 + num2; } addNums(); addNums(5,6); console.log('addNums() 阅读全文
posted @ 2022-11-09 23:53
LeoShi2020
阅读(31)
评论(0)
推荐(0)
摘要:
1. Switch // Switch 语句 const color = 'green'; switch (color) { case 'red': console.log('color is red'); break; case 'blue': console.log('color is blue 阅读全文
posted @ 2022-11-09 23:24
LeoShi2020
阅读(20)
评论(0)
推荐(0)
摘要:
1. 语句 // if 语句 let x = 10; if (x == 10) { console.log('x is 10') }; // if else if else x = 20; if (x 10) { console.log('x is 10'); } else if (x > 10) 阅读全文
posted @ 2022-11-09 23:19
LeoShi2020
阅读(40)
评论(0)
推荐(0)
摘要:
1. 语句 // For语句 for (let index = 0; index <=6; index++) { console.log(`For Loop Number:${index}`); } // While语句 let i = 0; while (i <=6) { console.log( 阅读全文
posted @ 2022-11-09 23:03
LeoShi2020
阅读(24)
评论(0)
推荐(0)
摘要:
1. 变量 // Javascript常用变量类型 // numbers,string,boolean, // Object:Array,Undefined,null // const 常量不能修改 // let和var 变量可修改 const name ="Tom"; const age = 22 阅读全文
posted @ 2022-11-09 22:31
LeoShi2020
阅读(44)
评论(0)
推荐(0)
摘要:
<!-- .test 生成class为test的div --> <div class="test"></div> <!-- #test 生成id为test的div --> <div id="test"></div> <!-- .test>a#test --> <div class="test"><a 阅读全文
posted @ 2022-11-09 14:23
LeoShi2020
阅读(55)
评论(0)
推荐(0)
摘要:
<!-- 随机生成3段文字 lorem*3 --> Lorem ipsum dolor, sit amet consectetur adipisicing elit. Facere repellendus et eius, dicta culpa repellat, at deleniti repu 阅读全文
posted @ 2022-11-09 13:58
LeoShi2020
阅读(602)
评论(0)
推荐(0)
摘要:
1. 修改首选项配置 2. 打开控制折叠方式 搜索 word wrap END 阅读全文
posted @ 2022-11-09 12:14
LeoShi2020
阅读(56)
评论(0)
推荐(0)
浙公网安备 33010602011771号