Search Results for: Leguminous split
functions will help us tidy this up later on. but for now, back to hangman. hiding the answer so, let's hide the answer, and only show our bad guesses, and we're well on our way. to start with, our word isn't that easy to deal with is as string, so let's turn it into an array. init: { word: 'application'.split
isinword(guess, state)); // ... // views const badguesses = state => [ h ({}, 'incorrect guesses:'), ul( {class: 'guesses'}, badguesses(state).map(guess => li({class: 'guess'}, guess)), ), ]; // app app({ init: { word: 'application'.split(''), guesses: ['a', 'b', 'c', 'd'], }, view: state => div({},...
https://adamdawkins.uk/2019/10/7/an-introduction-to-hyperapp-part-2