2020年5月29日
摘要: https://segmentfault.com/a/1190000014175918?utm_source=tag-newest var arr=[2,34,54,66,43,20,20] var m=0; var n=0; for(var i=0;i<arr.length-1;i++){ for 阅读全文
posted @ 2020-05-29 20:38 猪mother 阅读(99) 评论(0) 推荐(0) 编辑
摘要: // var let const 区别 // ES5 只有全局作用域和函数作用域,没有块级作用域,这带来很多不合理的场景, <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>var</title> <scrip 阅读全文
posted @ 2020-05-29 17:36 猪mother 阅读(155) 评论(0) 推荐(0) 编辑
摘要: // 1.0数据类型有几种 // 值类型(基本数据类型):String Number Boolean undefined Symbol // 引用数据类型:Object Function Array null // 2.0typeof输出什么 可以设别所有的值类型 console.log(typeo 阅读全文
posted @ 2020-05-29 16:47 猪mother 阅读(179) 评论(0) 推荐(0) 编辑
摘要: // 1.0 一般形式的函数调用 // 在默认情况下,函数是不会执行的,使用小括号可以激活并执行函数, // 可以传递零个或多个参数,参数之间通过逗号分隔 // 示例1: function f(x,y) { //定义函数 return x * y; //返回值 } console.log(f(f(5 阅读全文
posted @ 2020-05-29 10:39 猪mother 阅读(277) 评论(0) 推荐(0) 编辑