Public
Edited
Jan 23, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {words} from '@a-lexwein/find-a-big-word'
Insert cell
fitsThePattern = (word) => {
if (word.length != letterCount) return false

for (let index = 0; index < word.length; ++index) {
if (word[index] === word[index + 1]) return true
}

return false
}
Insert cell
words.filter(fitsThePattern)
Insert cell
alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');
Insert cell
fitsThePatternLetter = (word, letter) => {
if (word.length != letterCount) return false

for (let index = 0; index < word.length; ++index) {
if ((word[index] === word[index + 1]) && word[index] == letter) return true
}

return false
}
Insert cell
words.filter(x => fitsThePatternLetter(x, 'i'))
Insert cell
list = alphabet.map(x => ({letter: x, words: words.filter(y => fitsThePatternLetter(y, x))}))
Insert cell
letterDiv = (x) => {
const words = x.words.join(", ")
const el = html`<div>
<h2 class="letter">${x.letter.toUpperCase()} - ${x.words.length} words</h3>
<p class="wordlist">${words}</p>
</div>`
return el
}
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more