第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

bottonName = bottonName || 'first';

bottonName = bottonName || 'first';//字符串的或操作該怎么理解,真的全靠猜?。。。。╞ottonName為空then bottonName='first';bottonName不為空then bottonName=bottonName ?嗎???)

正在回答

4 回答

如果存在bottonName,則bootonName=bottonName,否則,bottonName=first

6 回復 有任何疑惑可以回復我~
#1

qq_邊緣又傲嬌的馬爾福_0 提問者

非常感謝!
2016-08-26 回復 有任何疑惑可以回復我~

我也是才明白。原來這與運算符的優(yōu)先級有關。

a=b||c

b為真(b不等于0)則a=b不管c;

若b為假(b=0)則a=c

0 回復 有任何疑惑可以回復我~

關于這個語法介紹過嗎?

bottonName = bottonName || 'first';

記不起來了。

0 回復 有任何疑惑可以回復我~
#1

堅持MyDream

這個東西,我的認知只有 bottonName等于bottonName或first。
2017-01-23 回復 有任何疑惑可以回復我~

點擊第一個按鈕時,bottonName是undefined,所以顯示first,點擊第二個按鈕時last傳參給bottonName,變成有值了,所以是last.

2 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

bottonName = bottonName || 'first';

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號