Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pinCode(input) {
- let firsNum = Number(input[0]);
- let secondNum = Number(input[1]);
- let thirdNum = Number(input[2]);
- let result = ""
- let counter = 0
- for (let x = 1; x <= firsNum; x++) {
- if (x % 2 === 0) {
- for (let y = 1; y <= secondNum; y++) {
- switch (y) {
- case 2:
- case 3:
- case 5:
- case 7:; break;
- default:
- continue;
- }
- for (let z = 1; z <= thirdNum; z++) {
- if (z % 2 === 0) {
- result =`${x}${y}${z}`
- console.log(result);
- }
- }
- }
- }
- }
- }
- pinCode([
- "8",
- "2",
- "8"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement