MCPcopy Create free account
hub / github.com/appacademy/Module-1-Resources / threeOrSeven

Function threeOrSeven

w1/d2/conditionals.js:98–107  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

96Math.random() < .5 ? console.log('heads') : console.log('tails');
97
98function threeOrSeven(num){
99 // console.log(num);
100 // console.log(num % 3)
101 if(num === 0) return 0;
102 if(num % 7 === 0 && num % 3 === 0 && num !== 0) return 21
103 else if(num % 7 === 0) return 7
104 else if (num % 3 === 0) return 3
105 else return num;
106
107}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected