![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JS Function
二狗doggy
这个作者很懒,什么都没留下…
展开
-
函数的prototype
函数的prototype: /**函数的prototype * 函数都有一个prototype属性,它指向原型对象 * 原型对象中有一个constructor属性,它指向函数对象 * 给原型对象添加属性: * 函数的实例对象继承原型中的属性 */ console.log(Date.prototype, typeof...原创 2019-10-12 23:00:37 · 237 阅读 · 0 评论 -
函数中的this
this: /**函数中的this * 所有函数内部都有变量this * 它的值是调用函数的当前对象 */ function Person(name) { console.log(this); this.name = name; this.getName = function () { ...原创 2019-10-12 10:23:39 · 77 阅读 · 0 评论 -
Function基础知识
JS Function: /**定义函数: * 函数声明 * 表达式 */ function func() { //函数声明 alert("hello"); } var f = function () { //表达式 alert("hello"); }; /**调用函数...原创 2019-10-11 18:27:27 · 169 阅读 · 0 评论