js switch(true){caseisSquare(shape):console.log("该形状是一个正方形。");// 失败,因为正方形也是矩形的一种!caseisRectangle(shape):console.log("该形状是一个矩形。");caseisQuadrilateral(shape):console.log("该形状是一个四边形。");break;caseisCircle(shape):console.log("该形状是一个圆形。")...
@import "foo.css"; // statement left in place, as-is 1. 2. 3. 4. 参数 @import (keyword) "filename"; reference: use a Less file but do not output it inline: include the source file in the output but do not process it less: treat the file as a Less file, no matter what th...
var foo = 0; switch (foo) { case -1: console.log('negative 1'); break; case 0: // foo is 0 so criteria met here so this block will run console.log(0); // NOTE: the forgotten break would have been here case 1: // no break statement in 'case 0:' so this case will run...