In Javascript
In this PreLab you will write the code to control playermovement through a 2d grid of a simple puzzle game inspired by the1991 hit game Chip’s Challenge. This is a 2d grid-based puzzle gamewhere the player collects chips to unlock the exit while avoidinghazards and using keys to unlock doors. Save your code from thisPreLab as you’ll combine it with code you’ll write in other partsof the course to develop the game one piece at a time.
As is common in grid-based games the map for each level will berepresented by an array of arrays with integer values where eachinteger
OR
OR