Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

Learn More

using mozilla console

  • 1 réponse
  • 0 a ce problème
  • 9 vues
  • Dernière réponse par 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.
Captures d’écran jointes

Toutes les réponses (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);
}

Cela vous a-t-il été utile ?

Poser une question

Vous devez vous identifier avec votre compte pour répondre aux messages. Veuillez poser une nouvelle question, si vous n’avez pas encore de compte.