Games JavaScript Code Snippets

These snippets are all JavaScript games. Play the classic games Mastermind or Tic-Tac-Toe or any one of the dozen other games. If you plan to use these snippets, please remember that these snippets have some of the longest and most complicated source codes of any snippets in our archives.

Results via Envato Market

Check out this fun crossword puzzle JavaScript! XWord can be played within Internet Explorer without the need to download any special software.

This script comes up with a prompt after you click on a button. It asks you for your age, and then it gives you your age in dog years.

A basic word scramble game, click the letter to choose it or click it a second time to move it back. Simple, fun and a classic. Works with any amount of words.

Rumor has it the Feds have a way to track where you were born. This JavaScript uses their database to find out where you were born. Give it a try!

“Just like the popular ABC gameshow, “”Who wants to be a millionare”” Complete with 75+ questions and three lifelines per game”

Ask a question and unseen forces will spell out a reply. A demonstration of DHTML purely for entertainment, works on Netscape and IE 4.0+.

The coolest warship battle game of its type in Javascript. You get 10 warships in 4 types, shoot 3 targets per bomb and get 20 bombs for each game. You will have to be tough, instead of lucky, to win. Featuring graphic interface, auto/manual warship deployment, shoot & mark, score board, spy, etc.

“This script allows two people to compete with a deck of cards playing “”War””.”