jeudi 4 juin 2015

Double Maths Random in Array with Javascript

I need your help because I'm totally lost with a javascript exercise (I learn alone).

I cut the exercice in steps

  1. I generate an aleatory number between 3 and 20 (with Maths Random)
  2. I generate an array of 100 cells: In each cells, there is one " _ "
  3. If the number is 5: 5 " _ " is aleatory replaced by a " # " (second Maths Random)

I think my cut is good but I can't write it in code. Before this exercise I've done exercises easier with maths random but now it's more diffult for me.

Some can help me to create the code?

Thank you very much




Aucun commentaire:

Enregistrer un commentaire