Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads.
Pig Latin is a game of alterations played on the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). Read Wikipedia for more information on rules.
Given the grid below, rotate the matrix by 90 degrees and return rotated matrix. For example:
var grid = [ [0,0], [0,1], [0,2], [0,3], [1,0], [1,1], [1,2], [1,3], [2,0], [2,1], [2,2], [2,3], [3,0], [3,1], [3,2], [3,3] ];
Should return:
[3, 0] [2, 0] [1, 0] [0, 0] [3, 1] [2, 1] [1, 1] [0, 1] [3, 2] [2, 2] [1, 2] [0, 2] [3, 3] [2, 3] [1, 3] [0, 3]