function myFactorial(){
var factorial1 = this.num1*(this.num1-1)*(this.num1-2)*(this.num1-3)*(this.num1-4);
var factorial2 = this.num2*(this.num2-1)*(this.num2-2)*(this.num2-3);
return (factorial1,factorial2);
}
我想显示用逗号分隔的factorial1和factorial2。请帮忙。谢谢! :)
答案 0 :(得分:0)
为什么你不能尝试这个:
return factorial1+','+factorial2;
答案 1 :(得分:-1)
我们不能在return语句中返回两个值。但我们可以实现这样的目标
var factorial = { "factorial1": factorial1, "factorial2": factorial2 };
return factorial;
希望这会对你有所帮助。
答案 2 :(得分:-1)
做点什么
<input name="username" type="text" class="form-control" placeholder="User ID" autofocus value="<?php echo set_value('username'); ?>" >
<br>
<input name="password" type="password" class="form-control" placeholder="Password" value = "<?php echo set_value('password'); ?>">