命名

  • Boolean 值命名最好是 has, is 開頭

// bad
let called = false

// good
let hasBeenCalled = false

for 裡的 argument

Argument
Naming

function

fn

Last updated