jeudi 23 avril 2015

JavaScript, create an Array with random 10 numbers from 1 to 10, Array length 9 elements. Find the number what leftover?

I search everywhere here but couldn't find the answer...only some pieces of it.. I got an interview question... You have an array and it's array.length=9. You have 10 numbers, from 1 to 10. Put those numbers randomly to Array. How to find/return the number what leftover and not got to the Array. Any solutions?




Aucun commentaire:

Enregistrer un commentaire