摘要: 原文:https://css tricks.com/everything you need to know about date in javascript/ 作者: "Zell Liew" 日期在JavaScript中很奇怪。当我们需要处理日期和时间的时候,它会让我们非常紧张,以至于我们需要借助于 阅读全文
posted @ 2019-06-28 15:40 zllmh 阅读(187) 评论(0) 推荐(0) 编辑
摘要: explicit coercion of a symbol to a string is allowed, but implicit coercion of the same is disallowed and throws an error. symbol values cannot coerce 阅读全文
posted @ 2019-04-24 01:04 zllmh 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Both || and && operators perform a boolean test on the first operand (a or c). If the operand is not already boolean (as it's not, here), a normal ToB 阅读全文
posted @ 2019-04-24 01:03 zllmh 阅读(110) 评论(0) 推荐(0) 编辑
摘要: true becomes 1 and false becomes 0. undefined becomes NaN, but (curiously) null becomes 0 Objects (and arrays) will first be converted to their primit 阅读全文
posted @ 2019-04-23 23:22 zllmh 阅读(283) 评论(0) 推荐(0) 编辑
摘要: According to ES5 spec section 11.6.1, the + algorithm (when an object value is an operand) will concatenate if either operand is either already a stri 阅读全文
posted @ 2019-04-23 23:15 zllmh 阅读(113) 评论(0) 推荐(0) 编辑
摘要: ToBoolean Falsy Values All of JavaScript's values can be divided into two categories: 1. values that will become false if coerced to boolean 2. everyt 阅读全文
posted @ 2019-04-23 10:35 zllmh 阅读(291) 评论(0) 推荐(0) 编辑
摘要: The JSON.stringify(..) utility will automatically omit undefined, function, and symbol values when it comes across them. If such a value is found in a 阅读全文
posted @ 2019-04-23 10:03 zllmh 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Rather than running away from what you don't fully understand because everyone else does, or because you get bitten by some quirk, I think you should 阅读全文
posted @ 2019-04-23 02:02 zllmh 阅读(103) 评论(0) 推荐(0) 编辑
摘要: setTimeout ("getProgress(name,type)", 3000) 发现getProgress函数 带上参数 就失效了,不带参数可以调用又达不到效果 解决办法:匿名函数包装 改成如下即可 setTimeout(function(){getProgress(name, type)} 阅读全文
posted @ 2019-03-13 19:45 zllmh 阅读(1090) 评论(0) 推荐(0) 编辑
摘要: 定义一个正则表达式: 阅读全文
posted @ 2019-03-07 15:27 zllmh 阅读(5034) 评论(0) 推荐(0) 编辑