+ 5
maybe try: for( var i=0; i < 3; i++) m=rotate_90(m) I don’t think this will fix the problem though, it should just make i a local variable, but maybe that’s the issue?
14th Jun 2019, 4:08 PM
Jackson O’Donnell
+ 9
Indeed I tried with for(let i=0;i!=3...etc) and it worked ! Thank you Jackson O’Donnell !
14th Jun 2019, 4:24 PM
Uni
Uni - avatar
+ 8
Jackson O’Donnell sorry my question wasn't clear.... So in python it works but not in javascript: in javascript I believe that it runs forever because if I alert the output, that alert will never show up...
14th Jun 2019, 4:02 PM
Uni
Uni - avatar
+ 1
is the rotate_90(m) written in JS as well? It may be an issue in that function. And what is your error? Does it just not run? Run forever? Wrong output?
14th Jun 2019, 3:57 PM
Jackson O’Donnell