3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
求冪運算符let a = 7 ** 12let b = 2 ** 7console.log(a === Math.pow(712)) // trueconsole.log(b === Math.pow(27)) // true//let a = 7a **= 12let b = 2b **= 7console.log(a === Math.pow(712)) // trueconsole.log(b === Math.pow(27)) // true這篇文章分享之前我還是要推薦下我自己的前端小白群:477149581,不管你是小白還是大牛,小編我都挺歡迎,不定期分享乾貨,包括我自己整理的一份2017最新前端資料和零基礎入門教程,歡迎初學和進階中的小夥伴另一種寫法let a = 7a **= 12let b = 2b **= 7console.log(a === Math.pow(712)) // trueconsole.log(b === Math.pow(27)) // trueincludes方法//包含數組裡的數,列印true。//不包含數組裡的數,則列印false。var aa=[123];console.log(aa.includes(5));//falseconsole.log(aa.includes(3));//true字元填充函數padStart 和 padEndpadStartconsole.log('react'.padStart(10).length) // " react" is 10console.log('backbone'.padStart(10).length) // " backbone" is 10padEndconsole.log('react'.padEnd(10, ':-)')) // "react:-):-" is 10console.log('backbone'.padEnd(10, '*')) // "backbone**" is 10在這裡我還是要推薦下我自己建的前端學習群:477149581,不說其他的,首先你要是前端黨,不管你是小白還是大牛,小編我都挺歡迎,小白嘛,主動點,勤快點,多問點問題也就學好了,就怕你自己死敲代碼啊,不定期分享乾貨,頭條號內分享的所有酷炫特效源碼都在這,歡迎初學和進階中的小夥伴。

本文由yidianzixun提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦