How to turn the result of the cycle?

There is a cycle:
var namber = 3;
var namberTwo = namber * namber;
for (var i = 1; i <= namber; i += 1) {
 process.stdout.write(i + "\t");
 for (var a = i + namber; a <= namberTwo; a += namber) {
 if (a <= (namberTwo - namber)) {
 process.stdout.write(a + "\t");
 } else {
 process.stdout.write(a + "\n");
}
}
}


Which displays the result:
1 4 7
2 5 8
3 6 9


How to turn the result? That is, bring:
3 2 1
6 5 4
9 8 7
March 12th 20 at 07:59
3 answers
March 12th 20 at 08:01
Solution
var num = 3; 

for (var i = 1; i <= num; i++) {
 for (var j = 0; j < num; j++) { 
 process.stdout.write(`${i * num - j}\t`);
}
process.stdout.write('\n');
}
March 12th 20 at 08:03
Namber is cool...
March 12th 20 at 08:05
for (var i=namber; i <= 1; i--)

Find more questions by tags Node.jsJavaScript