File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed
09 - Dev Tools Domination Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 44> 简介:[ JavaScript30] ( https://javascript30.com ) 是 [ Wes Bos] ( https://github.com/wesbos ) 推出的一个 30 天挑战。项目免费提供了 30 个视频教程、30 个挑战的起始文档和 30 个挑战解决方案源代码。目的是帮助人们用纯 JavaScript 来写东西,不借助框架和库,也不使用编译器和引用。现在你看到的是这系列指南的第 9 篇。完整指南在 [ GitHub] ( https://github.com/soyaine/JavaScript30 ) ,喜欢请 Star 哦♪(^∇^* )
55
66> 创建时间:2017-01-06
7- 最后更新:2017-01-06
7+ 最后更新:2017-09-24
88
99## 实现效果
1010
3131``` js
3232console .log (" 输出一个字符串 %s " , " log" );
3333console .log (" 输出一个整数是 %d " , 1.23 ); // 1
34- console .log (" 输出一个小数是 %d " , 1.23 ); // 1.23
34+ console .log (" 输出一个小数是 %f " , 1.23 ); // 1.23
3535console .log (" %c不同样式的输出效果" , " color: #00fdff; font-size: 2em;" );
3636```
3737
@@ -119,4 +119,7 @@ fetch("https://api.github.com/users/soyaine")
119119
120120如果 timeEnd 中的名称如果和上面不一样,得到的数据是系统当前时间换算后的毫秒值。
121121
122- ** ~ \( ≧▽≦)/~ 调试技巧这部分就结束啦,拿起宝剑去开疆扩土吧~ **
122+ ** ~ \( ≧▽≦)/~ 调试技巧这部分就结束啦,拿起宝剑去开疆扩土吧~ **
123+
124+ ## ChangeLog
125+ - 2017-09-24 fix typo [ issue #29 ] ( https://github.com/soyaine/JavaScript30/issues/29 )
Original file line number Diff line number Diff line change 2424 // Interpolated
2525 // 字符替换
2626 console . log ( "我的名字叫做 %s " , "log" ) ;
27- console . log ( "我的年龄是 %d " , 1.23 ) ;
27+ console . log ( "我的年龄是 %f " , 1.23 ) ;
2828// console.log("我的名字叫做 %o ", {1.23: 12});
29-
29+
3030 // Styled
3131 // 设定输出的样式
3232 console . log ( "偷偷告诉你,我会变身 %c ~\(≧▽≦)/~巴拉拉~~" , "color: #00fdff; font-size: 2em;" ) ;
4545 const p = document . querySelector ( 'p' ) ;
4646 console . log ( p ) ;
4747 console . dir ( p ) ;
48-
48+
4949 // Testing
5050 console . assert ( 1 === 1 , "(这句发布时删除)" ) ;
5151 console . assert ( 1 === 0 , "看看看,失策了吧" ) ;
5252 console . assert ( p . innerHTML . match ( "她" ) , "我这儿才没有她这个人" ) ;
53-
53+
5454 // clearing
5555// console.clear();
56-
56+
5757 // Grouping together
5858 dogs . forEach ( dog => {
59- console . group ( ) ;
59+ console . group ( ) ;
6060// console.groupCollapsed(); // 收起列表
6161 console . log ( `${ dog . name } ` ) ;
6262 console . log ( `${ dog . age } ` ) ;
6363 console . log ( `${ dog . name } 有 ${ dog . age } 岁了` ) ;
6464 console . groupEnd ( ) ;
6565 } ) ;
66-
66+
6767 //
6868 console . table ( dogs ) ;
6969 console . table ( dogs , [ "age" ] ) ;
70-
71- // counting
70+
71+ // counting
7272 console . count ( "(读来过反)羊只" ) ;
7373 console . count ( "(读来过反)羊只" ) ;
7474 console . count ( "(读来过反)鱼条" ) ;
9090
9191 </ script >
9292</ body >
93- </ html >
93+ </ html >
You can’t perform that action at this time.
0 commit comments