1.三元表达式不要用来判断真假值
let bought = (account && account.period_record_length || account.standard_class_record_length) ? true : false; // if true, = true
2.不要用零判定假值,除非程序设计零有false的意义
if (timetable.length) { ... // if not empty ... if (timetable.length > 0) { ... // should be
3.