comparison - Comparing two functions in JavaScript -
i'm developing mobile app wife's 1st grade class can practice sight words. i'm novice javascript able pull off first objective take javascript array , extract random word it. second objective have user type in word see, click button , have word entered compared random word. attempted second function did not it. don't errors in console i'm bit lost on how working. appreciated me , great group of 1st graders. here code have far. <!doctype html> <html> <body> <h1>practice spelling test</h1> <p id="aword"></p> <input id="yourturn"> <button onclick="myfunction()">new word</button> <button onclick="checkspelling()">check spelling</button> <p id="result"></p> <script> var sightword = ["hoof", "hook", "shook", "hood", "wood", "took", "book", "good"