A Simple implementation of the Word Chain game using backtracking.
$ npm install --save word-chain
const wordChain = require('word-chain');
const dictionary = ['cat', 'hat', 'hats', 'bats', 'mat', 'mats', 'at', 'bat', 'cog', 'cot', 'dog'];
const result = wordChain('cat', 'dog', dictionary);
//=> ['cat', 'cot', 'cog', 'dog']