xgqfrms / learning

learning : A collection of all kinds of resources, videos, pdf, blogs, codes... 📚 + 💻 + ❤
https://learning.xgqfrms.xyz
MIT License
16 stars 12 forks source link

js parse string to number #78

Open xgqfrms opened 4 years ago

xgqfrms commented 4 years ago

js parse string to number

const str = `1234567`;

const num = +str;
// 1234567

image

xgqfrms commented 4 years ago

copy

Chrome DevTools

https://developers.google.com/web/updates/2019/12/devtools#redeclarations

copy(JSON.stringify(JSON.parse(temp1), null, 4));

copy(JSON.stringify(JSON.parse(temp2), null, 4));

image

xgqfrms commented 4 years ago

https://www.cnblogs.com/xgqfrms/p/12376527.html