Created
April 21, 2017 14:30
-
-
Save johngibb/570a8c2d8e467700f64f309bd8c6a561 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var count = 0; | |
for (var i = 0; i < 5; i++) { | |
for (var j = 0; j < 5; j++) { | |
for (var k = 0; k < 5; k++) { | |
if ( | |
i == 0 || i == 4 || | |
j == 0 || j == 4 || | |
k == 0 || k == 4 | |
) { | |
count++; | |
} | |
} | |
} | |
} | |
console.log(count); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment