Skip to content

Instantly share code, notes, and snippets.

View richardtaylordawson's full-sized avatar
💻

Richard Taylor Dawson richardtaylordawson

💻
View GitHub Profile
const high = (words) => {
const alphabet = "abcdefghijklmnopqrstuvwxyz";
let wordScores = words.split(" ").reduce((accumulator, item, index, array) => {
let total = 0;
item.split("").map(letter => {
total += alphabet.indexOf(letter)
});
function narcissistic(n) {
var t = 0;
var i = 0;
var v = value.toString();
var l = v.length;
for(; i < s; i++) {
t += Math.pow(v[i], s);
}