Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Mozilla Support में खोजें

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

using mozilla console

  • 1 प्रत्युत्तर दें
  • 0 यह समस्या है
  • 2 views
  • के द्वारा अंतिम प्रतियुतर 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.
संलग्न स्क्रीनशॉट

All Replies (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);
}