TZinovieva

Unique PIN Codes JS

Nov 4th, 2022
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function uniquePINCodes(input) {
  2.     let endFirst = Number(input[0]);
  3.     let endSecond = Number(input[1]);
  4.     let endThird = Number(input[2]);
  5.  
  6.     for (let first = 2; first <= endFirst; first += 2) {
  7.         for (let second = 2; second <= endSecond; second++) {
  8.             for (third = 2; third <= endThird; third += 2) {
  9.                 if (second === 2 || second === 3 || second === 5 || second === 7) {
  10.                     console.log(`${first} ${second} ${third}`);
  11.                 }
  12.             }
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment