Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

using mozilla console

  • 1 antwoord
  • 0 hebben dit probleem
  • 10 weergaven
  • Laatste antwoord van 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.
Gekoppelde schermafbeeldingen

Alle antwoorden (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);
}

Behulpzaam?

Een vraag stellen

U moet zich aanmelden bij uw account om op berichten te antwoorden. Stel een nieuwe vraag als u nog geen account hebt.