function wordscore(word) {
let scope = {
"a": 1,
"b": 3,
"c": 3,
"d": 2,
"e": 1,
"f": 4,
"g": 2,
"h": 4,
"i": 1,
"j": 8,
"k": 5,
"l": 1,
"m": 3,
"n": 1,
"o": 1,
"p": 3,
"q": 10,
"r": 1,
"s": 1,
"t": 1,
"u": 1,
"v": 4,
"w": 4,
"x": 8,
"y": 4,
"z": 10
},
arr = word.split(''),
wordLen = word.length;
lenLong = word.length >= 7 ? 50 : 0;
if (!arr.length) return 0;
let widthScope = arr.reduce((a, b) => {
if (scope[b]) {
return a + scope[b];
}
}, 0);
if (wordLen >= 7) return ${widthScope * wordLen + lenLong} "The expected score for ${word} was ${widthScope * wordLen +lenLong}.;
return ${widthScope * wordLen + lenLong} The expected score for ${word} was ${widthScope * wordLen + lenLong};
}