小程序基础类库
console
console.log 方法用于在 console 窗口输出信息。它可以接受多个参数,将它们的结果连接起来输出。
Math
属性
ELN10LN2LOG2ELOG10EPISQRT1_2SQRT2
以上属性的具体使用请参考
ES5标准。
方法
absacosasinatanatan2ceilcosexpfloorlogmaxminpowrandomroundsinsqrttan
以上方法的具体使用请参考
ES5标准。
JSON
方法
stringify(object): 将object对象转换为JSON字符串,并返回该字符串。parse(string): 将JSON字符串转化成对象,并返回该对象。
示例代码:
console.log(undefined === JSON.stringify());
console.log(undefined === JSON.stringify(undefined));
console.log("null"===JSON.stringify(null));
console.log("111"===JSON.stringify(111));
console.log('"111"'===JSON.stringify("111"));
console.log("true"===JSON.stringify(true));
console.log(undefined===JSON.stringify(function(){}));
console.log(undefined===JSON.parse(JSON.stringify()));
console.log(undefined===JSON.parse(JSON.stringify(undefined)));
console.log(null===JSON.parse(JSON.stringify(null)));
console.log(111===JSON.parse(JSON.stringify(111)));
console.log("111"===JSON.parse(JSON.stringify("111")));
console.log(true===JSON.parse(JSON.stringify(true)));
console.log(undefined===JSON.parse(JSON.stringify(function(){})));
Number
属性
MAX_VALUEMIN_VALUENEGATIVE_INFINITYPOSITIVE_INFINITY
以上属性的具体使用请参考
ES5标准。
Date
属性
parseUTCnow
以上属性的具体使用请参考
ES5标准。
Global
属性
NaNInfinityundefined
以上属性的具体使用请参考
ES5标准。
方法
parseIntparseFloatisNaNisFinitedecodeURIdecodeURIComponentencodeURIencodeURIComponent
以上方法的具体使用请参考
ES5标准。
作者:子钦加油
出处:https://www.cnblogs.com/zmdComeOn/
个性签名:努力生活,努力走路
阿里云拼团:https://www.aliyun.com/1111/home?userCode=f4ee1llo1核2G1M,86一年,229三年;2核4G5M,799三年;2核8G5M,1399三年
腾讯云三月采购计划特价:https://cloud.tencent.com/act/cps/redirect?redirect=1073&cps_key=15d0b1673287c43fe946626d9f4e2eee&from=console1核2G1M,88一年;1核2G1M,268三年;2核4G5M,998一年;4核8G5M,2888元三年
出处:https://www.cnblogs.com/zmdComeOn/
个性签名:努力生活,努力走路
阿里云拼团:https://www.aliyun.com/1111/home?userCode=f4ee1llo1核2G1M,86一年,229三年;2核4G5M,799三年;2核8G5M,1399三年
腾讯云三月采购计划特价:https://cloud.tencent.com/act/cps/redirect?redirect=1073&cps_key=15d0b1673287c43fe946626d9f4e2eee&from=console1核2G1M,88一年;1核2G1M,268三年;2核4G5M,998一年;4核8G5M,2888元三年
浙公网安备 33010602011771号