Creates a WordList object from an array of words/phrases or a dictionary
Either an array of strings or an object with text/image/partOfSpeech properties
A WordList object ready to be used in Grid3
// From simple arrayconst wordlist = createWordlist(['hello', 'goodbye', 'thank you']); Copy
// From simple arrayconst wordlist = createWordlist(['hello', 'goodbye', 'thank you']);
// From array of objectsconst wordlist = createWordlist([ { text: 'hello', image: '[WIDGIT]greetings/hello.emf', partOfSpeech: 'Interjection' }, { text: 'goodbye', image: '[WIDGIT]greetings/goodbye.emf', partOfSpeech: 'Interjection' }]); Copy
// From array of objectsconst wordlist = createWordlist([ { text: 'hello', image: '[WIDGIT]greetings/hello.emf', partOfSpeech: 'Interjection' }, { text: 'goodbye', image: '[WIDGIT]greetings/goodbye.emf', partOfSpeech: 'Interjection' }]);
Creates a WordList object from an array of words/phrases or a dictionary