NAME_1 write JavaScripts codes work as below.

Player Hand Score
The function playerHandScore that takes in a string of face cards (NAME_2, NAME_3, and King only) and returns the total score of the players hand.

The cards are represented by the first letter in the name of the card:

A "K" is 4 points
A "Q" is 3 points
A "J" is 2 points
Example Usage:

console.log( playerHandScore("K") ); // 4
console.log( playerHandScore("KJ") ); // 6
console.log( playerHandScore("KQQ") ); // 10 