摘要: 首先我想说明我本文阐述的是纯粹从美学的角度来写出代码,而非技术、逻辑等。以下为写出漂亮代码的七种方法:1.尽快结束 if 语句例如下面这个JavaScript语句,看起来就很恐怖:function findShape(flags, point, attribute, list) {if(!findShapePoints(flags, point, attribute)) {if(!doFindShapePoints(flags, point, attribute)) {if(!findInShape(flags, point, attribute)) {if(!findFromGuide(fl 阅读全文