0xarch's Site
首页 归档 关于

JS特性:this

2024-12-04 #JavaScript

关于 JavaScript 中不同地方的 this 指向。

本文中所有 Demo 均在 RunJS 中运行。

函数对象本身

当函数作为构造器被调用时,this 指向自身。

function constructor(){
  console.log(this);
}

new constructor();
← 都市天际线 DLC 补丁自定义教程 都市天际线跳过启动器 →

目录

    • #戴森球计划 1
    • #Linux 6
    • #新浪潮 4
    • #持续更新 1
    • #Windows 1
    • #archlinux 3
    • #Mint 2
    • #ChromeOS 1
    • #都市:天际线 2
    • #JavaScript 4

    • /游戏 3
    • /政治 1
    • /博客 2
    • /操作系统 4
    • /Code Snippets 4
    • /青岛公交线路图 1
    • /笔记 2

    0xarch's Site — The shelter

    由 Ngwg + Pacific 生成 · RSS · Sitemap