---
title: "Danny Engelman (@Danny-Engelman) | Hashnode"
description: "Online since 1990. Read the latest articles by Danny Engelman on Hashnode."
url: "https://hashnode.com/@Danny-Engelman"
---

@Danny-Engelman

# Danny Engelman

@Danny-Engelman · Joined May 2021

Online since 1990

## Comments

[Loose the return statement and make it a oneliner](https://hashnode.com/posts/testing-array-elements-in-javascript/64ed2a13d91e47899721d1d1/comment/64f2ff38352b1c82180c6705)

Comment · Article · Sep 2, 2023 · [Testing Array Elements in JavaScript](https://hashnode.com/posts/testing-array-elements-in-javascript/64ed2a13d91e47899721d1d1)

[FP: Don't do a SPACE for a letter match, but a false value, so its easier to test in the 2nd loop function word2colors(answer = "dread", guess = "added") { answer = answer.split(""); return guess .split("") .map((letter, idx) => letter == answer\[idx\] ? (answer\[idx\] = false) : letter ) .map((letter, idx) => letter ? (idx = answer.indexOf(letter)) < 0 ? "GRAY" : (answer\[idx\] = "YELLOW") : "GREEN" ); // \['YELLOW', 'YELLOW', 'GRAY', 'YELLOW', 'GREEN'\] } console.log(word2colors()); FYI, why built a clone at all? You can use the Web Components of the original Wordle](https://hashnode.com/posts/why-most-wordle-clones-are-wrong/6201725f3a8a6e5fe119a460/comment/6206671ca2be760e35394056)

Comment · Article · Feb 11, 2022 · [Why Most Wordle Clones are Wrong!](https://hashnode.com/posts/why-most-wordle-clones-are-wrong/6201725f3a8a6e5fe119a460)

[FYI, HTML5 has default tags to create an accordion: https://dev.to/dannyengelman/acme-the-accordion-web-component-in-187-bytes-47ah](https://hashnode.com/posts/create-your-own-html-tag-using-javascript/60a526f95c1fcb407736575b/comment/60a55dde4e7f9549fc32f847)

Comment · Article · May 19, 2021 · [Create your own HTML tag using JavaScript](https://hashnode.com/posts/create-your-own-html-tag-using-javascript/60a526f95c1fcb407736575b)
