这是一个关于递归的测试方法
else 应该放到if后面,你放在if代码块里面了,正确应该这么写
if(a == 1) { return 1; } else { return a*test(a-1); }
if后面多了一个左括号
正确标准的语法是这样的:if (){}else{}