I have separated file by file so that all parts of the code can be understood.
This game is based on guessing a four digit number which is composed by different numbers in each digit, such as 1234, 8075, 6825.
There is no digit repetition in the searched four digits number.
If the guess is correct a “congratulations” alert will be appeared on the screen.
if your number location is different you can see when click the "Try it" button.
Enjoy