For loop Dart query assist
void major() {
var num = 5;
var factorial = 1;
for( var i = num ; i >= 1; i– ) {
factorial *= i ;
}
print(factorial);
}
The output is the factorial of five which is **120**. How is that this code getting compiled? The sixth line is giving 5,4,3,2, and 1 on every loop however how did they were given multiplied and the output is 120
View Reddit by means of Solid_Nerve2174 – View Supply