Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Sunday 23 September 2018

Generating non-repeating random numbers in JS


Generating non-repeating random numbers in JavaScript

I was solving a JavaScript task, and it requested to print a random tip about JavaScript, but I didn't want to print it to repeat the tip as it boring to see the same tip over and over again. So I have built the below code to do it using (math.random), recursive function and foreach loop.

Before you judge I am still in the learning process 😀😀😁, waiting your feedback.


See the Pen Generating non-repeating random numbers in JS by Mohamed El Ghandour (@GunnZ) on CodePen.