在函数内部,有两个特殊的对象: arguments 和 this
1. arguments 主要用途是 保存函数参数
argument 对象还要一个 callee 的属性,该属性指向 拥有 arguments 对象的函数
1 | // 以阶乘函数为例 |
2. this 对象代表函数据以执行的执行环境的变量对象(可参考上一文章)
1 | // 例子 |
另ES5 给函数添加了 caller 属性(作用:指向调用当前函数的函数(即当前函数他爸))
缺失模块。
1、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
2、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: true
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true