搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

using mozilla console

  • 1 个回答
  • 0 人有此问题
  • 10 次查看
  • 最后回复者为 cor-el

more options

Please read the image. does it look like I am using the console window correctly? I am trying to interactively code. So, started with a very basic basic code. When I run it, i get an error. There must must be something wrong.

Please read the image. does it look like I am using the console window correctly? I am trying to interactively code. So, started with a very basic basic code. When I run it, i get an error. There must must be something wrong.
已附加屏幕截图

所有回复 (1)

more options

If you use let and not var, then you can only define this variable once. So if you run the code a second time, then Firefox complains that you redefine the variable. You would either leave out the line with let a,b,c; or enclose the code in a {} block to make it local variables.

{
let a,b,c;
a=1;b=2;c=a+b;
console.info("a+b=",c);
}

有帮助吗?

我要提问

您需要登录才能回复。如果您还没账号,可以提出新问题