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

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more