rotateMatrix question

by Vladymyr Shevchuk

JavaScript

/**
 * This function should rotate matrix
 *
 * @param {Array<number>} arr - the an array of numbers
 * @return {Array<number>} - should return an array of numbers
 * @example
 * rotateMatrix([	
 *   [1, 2],
 *   [3, 4]
 * ]); 
 * [
 *   [1, 3]
 *   [2, 4]
 * ]
 */
const rotateMatrix = arr => {
	// logic...
};