scripts/index.js
/**
 * Strikethrough word and mark it as solved in the list
 * @param {MouseEvent} e
 */
Strikethrough word and mark it as solved in the list
@param {MouseEvent} e
Strikethrough word and mark it as solved in the list @param { MouseEvent } e
function wordSolved(e) {
    e.currentTarget.classList.toggle("solved-word");
    let adding = e.currentTarget.classList.contains("solved-word");
    let parent = e.currentTarget.parentElement;
    let currentSolved = parseInt(parent.getAttribute("data-solved"));
    if (adding)++currentSolved;
    else --currentSolved;
    parent.setAttribute("data-solved", currentSolved);
}
function wordSolved ( e ) { e . currentTarget . classList . toggle ( "solved-word" ) ; let adding = e . currentTarget . classList . contains ( "solved-word" ) ; let parent = e . currentTarget . parentElement ; let currentSolved = parseInt ( parent . getAttribute ( "data-solved" ) ) ; if ( adding ) ++ currentSolved ; else -- currentSolved ; parent . setAttribute ( "data-solved" , currentSolved ) ; }
Strikethrough word and mark it as solved in the list
 @param {MouseEvent} e
Strikethrough word and mark it as solved in the list @param { MouseEvent } e