Question: Please help with this exact code. I cannot get the value from the start function to enter the checkAnswer function. const words = [
Please help with this exact code. I cannot get the value from the start function to enter the checkAnswer function.
const words happy"lose","great","zainy","juice","point","grapes";
function startGame
const hintsa wonderful feeling","didn't win", "a feeling of mighty", "a crazy idea", "quenches your thirst","pencil tip","green and purple fruit";
const arrayIndex MathfloorMathrandom words.length;
pickedWordwordsarrayIndex;
pickedHinthintsarrayIndex;
document.getElementByIdhintTextinnerHTMLpickedHint;
document.getElementByIdpickedWordvaluepickedWord;
return pickedWord;
let word pickedWord;
function checkAnswerword
let correctAnswers;
let userGuess document.getElementByIdguessedWordvalue;
console.loguserGuess;
ifuserGuess word
correctAnswers ;
else
alertPlease try again.";
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
