{"size": 403, "ext": "js", "max_stars_repo_path": "2. cyclic-rotation/cyclic-rotation-submission.js", "max_stars_repo_name": "bthuffman/binary-gap", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "2. cyclic-rotation/cyclic-rotation-submission.js", "max_issues_repo_name": "bthuffman/binary-gap", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "2. cyclic-rotation/cyclic-rotation-submission.js", "max_forks_repo_name": "bthuffman/binary-gap", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.0, "max_line_length": 170, "alphanum_fraction": 0.6228287841}
function solution(A, K) {
	const newArr = [];
	for(let i = 0; i < A.length; i++){
		//take the indexes from array A and place them into newArr, move them over by K and with the % (A.length) keep the length of new Arr = to the original length of array A
		newArr[(i + K) % (A.length)] = A[i];
	}
// 	console.log(newArr);
	return newArr;
}

let A = [1, 2, 3, 4, 5];
let K = 3;
console.log(solution(A, K));