命名

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

// bad
let called = false

// good
let hasBeenCalled = false

for 裡的 argument

ArgumentNaming

function

fn

Last updated