// Access DOM element object
const rotated = document.getElementById('rotated');// Rotate element by 90 degrees clockwise
rotated.style.transform = 'rotate(90deg)';
// Access DOM element object
const rotated = document.getElementById('rotated');// Rotate element by 90 degrees clockwise
rotated.style.transform = 'rotate(90deg)';
matrix[0].map((val, index) => matrix.map(row => row[index]).reverse())