Created
February 23, 2018 21:23
-
-
Save panterozo/bafa4b2aefa4c305b3dfa25d5ea72cf1 to your computer and use it in GitHub Desktop.
Ejercicios Realizados en CodeFights.com
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
function rotateImage(a) { | |
let array = []; | |
for(let i=0; i<a.length; i++){ | |
let arrayIn = []; | |
let aux = 0; | |
for(let j=a[i].length-1; j>=0; j--){ | |
//console.log("i:"+i+"|j:"+j+": "+a[j][i]); | |
arrayIn[aux]=a[j][i]; | |
aux++; | |
} | |
array.push(arrayIn); | |
} | |
console.log(array); | |
return array; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment