if num 27 num console log indent self direction indent indent else if

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
if (num > 27 || num === 0) {
console.log('1/4');
indent = self.direction ? indent + 3 : indent - 3;
}
else if (num > 0 && num <= 9) {
console.log('2/4');
indent = self.direction ? indent - 3 : indent + 3;
}
else if (num > 9 && num <= 18) {
console.log('3/4');
indent = self.direction ? indent - 3 : indent + 3;
}
else if (num > 18 && num <= 27) {
console.log('4/4');
indent = self.direction ? indent + 3 : indent - 3;
}