Javascript is strange: ('b'+'a'+ +'a'+'a').toLowerCase() == 'banana'
('b'+'a'+ +'a'+'a').toLowerCase() == 'banana'
('b'+'a'+ +'a'+'a').toLowerCase()
'banana'
Why?
+ + 'a'
is + (+ 'a')
which becomes NaN
So
('b'+'a'+ +'a'+'a')
is
'baNaNa'
And then converted to Lowercase:
'banana'
The Weird Thing about Javascript – Part I
Steem to the Moon🚀!
- You can rent Steem Power via rentsp!
- You can swap the TRON:TRX/USDT/USDD to STEEM via tron2steem!
- You can swap the STEEM/SBD to SUI via steem2sui!
- You can swap the STEEM/SBD to SOL Solana via steem2sol!
- You can swap the STEEM/SBD to ETH Ethereum via steem2eth!
- You can swap the STEEM/SBD to Tether USDT (TRC-20) via steem2usdt!
- You can swap the STEEM/SBD to TRX (TRON) via steem2trx!
- You can swap the STEEM/SBD to BTS (BitShares) via steem2bts!
- Register a free STEEM account at SteemYY!
- Steem Block Explorer
- ChatGPT/Steem Integration: You can type !ask command to invoke ChatGPT
- Steem Witness Table and API
- Other Steem Tools
wow~ Interesting results! :)