菜鸟菜鸟菜菜鸟

2016年9月9日 #

正则表达式Regular expressions

摘要: 根据某种匹配模式来寻找strings中的某些单词 举例:如果我们想要找到字符串The dog chased the cat中单词 the,我们可以使用下面的正则表达式: /the/gi 我们可以把这个正则表达式分成几段: / 是这个正则表达式的头部 the 是我们想要匹配的模式 / 是这个正则表达式 阅读全文

posted @ 2016-09-09 19:28 菜鸟菜鸟菜菜鸟 阅读(263) 评论(0) 推荐(0)

生成的随机数是在两个指定的数之间

摘要: Math.floor(Math.random() * (max - min + 1)) + min 阅读全文

posted @ 2016-09-09 19:26 菜鸟菜鸟菜菜鸟 阅读(190) 评论(0) 推荐(0)

导航