This is a JavaScript version of the game called Senku.

The game begins by jumping one peg over another in a horizontal or vertical direction to a free hole, taking off the jumped one. (It's possible to retrieve pegs from the recipient to the board.)
The aim of the game is to eliminate as many pegs as possible.