Skip to content

Level 8筆誤 #23

Open
Open
@cakeant

Description

@cakeant

在Level 8的4. [ES6] 箭頭函數 (arrow function)區段

// Error: ES6 的匿名函數不會自動綁定 this,因此取不到 this.text
  setInterval(function() {
    console.log(this.text);
  }, 1000);

應為ES5, 不是ES6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions