English Language and Literature homework help

English Language and Literature homework help. Using the comments within the HTML Code write the necassary missing Javascript:div#memory_board{background:#CCC;border:#999 1px solid;width:800px;height:540px;padding:24px;margin:0px auto;}div#memory_board > div{background: pink;border:#000 1px solid;width:71px;height:71px;float:left;margin:10px;padding:20px;font-size:64px;cursor:pointer;text-align:center;}// global variable declaration// TODO declare array “memory_array” that contains 24 items, 12 pairs (e.g. A, A, B, B, etc…)// TODO declare array “memory_values” with no dataÿ// TODO declare array “memory_tile_ids” with no dataÿ// TODO declare a variable for keeping tracking of how many tiles are flippedÿ// TODO add an anonymous function to the Array object called memory_tile_shuffleArray.prototype.memory_tile_shuffle = function(){// TODO declare variable “length” set equal to the length of the array// TODO declare variable “rand”// TODO declare variable “temp”// TODO loop while the value of –length (using predecrement) is greater than 0while(){//TODO set variable rand equal to Math.floor(Math.random() * (length + 1))// TODO set variable temp equal to this array at index rand// TODO set this array index rand equal to this array index length// TODO set this array index length equal to temp}}// TODO write function newBoard, no parameters, to reset data for the gamefunction{// TODO reset variable for tiles flipped to equal 0// TODO create a variable for output set equal to an empty string// TODO call anonymous function memory_tile_shuffle// TODO perform a for loop from index 0 to the length of memory_arrayfor(){// TODO concatenate variable “output” to equal// ÿ ÿ ÿ”}// TODO update the document object, element id called ‘memory_board’, innerHTML// ÿ ÿ ÿso it is equal to the output variable}// TODO write function memoryFlipTile with parameters tile and valfunctionÿ{// TODO check if the innerHTML of object tile is equal to “” and// ÿ ÿ ÿthe length of array memory_values is less than 2if(){// style settings for the background of the tile objecttile.style.background = ‘#FFF’;// TODO set object tile innerHTML equal to the val parameter// TODO check if the length of array memory_values equals 0if(){// TODO call function push on array memory_values passingÿ// ÿ ÿ ÿ val as an argument// TODO call function push on array memory_tile_ids passing// ÿ ÿ ÿtile.id as an argument}ÿ// TODO check if the length of array memory_values equals 1else if(){// TODO call function push on array memory_values passingÿ// ÿ ÿ ÿ val as an argument// TODO call function push on array memory_tile_ids passing// ÿ ÿ ÿtile.id as an argument// TODO check if memory_values index 0 equals memory_values index 1if(){// TODO update the value of variable tiles_flipped to be increased by 2// TODO clear array memory_values// TODO clear array memory_tile_ids// TODO check to see if the whole board is cleared byÿ// ÿ ÿ ÿcomparing the number of tiles_flipped being equal to// ÿ ÿ ÿthe length of array memory_arrayif(){// TODO using an alert dialog box inform the user that// ÿ ÿ ÿthe board has been cleared and a new board is// ÿ ÿ ÿbeing generated// TODO update object document, id ‘memory_board’, innerHTML// ÿ ÿ ÿto be equal to “”// TODO call function newBoard}}ÿ// otherwiseelseÿ{// TODO write function flip2Back so it flips the turned over tiles to// ÿ ÿ ÿno longer be visiblefunction{// Flip the 2 tiles back over// TODO declare variable tile_1 set equal to object document,// ÿ ÿ ÿelement id memory_tile_ids, index 0// TODO declare variable tile_1 set equal to object document,// ÿ ÿ ÿelement id memory_tile_ids, index 1// style settings for tile_1tile_1.style.background = ‘pink’;tile_1.innerHTML = “”;// style settings for tile_2tile_2.style.background = ‘pink’;tile_2.innerHTML = “”;// TODO clear array memory_values// TODO clear array memory_tile_idsÿ}// TODO call function setTimeout passing arguments function flip2Back// ÿ ÿ ÿand the value 700}}}}

English Language and Literature homework help