Strike Through Text Effect with JavaScript
Always wondered how to strike-through some text? Here is all it takes
const strikeTrough = (text) =>
Array.prototype.reduce.call(text, (s, c) => (s += c + "\u0336"), "");
`I love ${strikeTrough("pineapple on")} pizza`;
// I love p̶i̶n̶e̶a̶p̶p̶l̶e̶ ̶o̶n̶ pizza
Paste the following snippet in the DevTools console (Cmd+Option+j):
window.prompt(
"",
Array.prototype.reduce.call(
window.prompt("Type Something"),
(s, c) => (s += c + "\u0336"),
""
)
);