{"id":412,"date":"2016-08-03T21:33:39","date_gmt":"2016-08-03T21:33:39","guid":{"rendered":"http:\/\/wenzo.net\/oldbonesjournal\/?p=412"},"modified":"2016-08-03T22:43:28","modified_gmt":"2016-08-03T22:43:28","slug":"function-quiz-javascript","status":"publish","type":"post","link":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/","title":{"rendered":"Function quiz javascript"},"content":{"rendered":"<p>In this post I will explain how to create a very simple HTML and Javascript quiz that uses functions. A function is a set of code in Javascript that does a specific task. Below is a example of a function:<\/p>\n<p><span style=\"color: #3366ff;\"><em>function\u00a0<\/em><span style=\"color: #339966;\">helloworldFunction()\u00a0<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff;\">alert<span style=\"color: #333333;\">(<span style=\"color: #ffcc00;\">&#8220;Hello world!&#8221;<span style=\"color: #333333;\">)<\/span><\/span><\/span><\/span><\/p>\n<p>When you open this code in a browser, the page alerts &#8220;hello world!&#8221;<\/p>\n<p>However, to make the function interesting, you can add it to an HTML button. For example:<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">button\u00a0<span style=\"color: #339966;\">onClick=<span style=\"color: #ffcc00;\">&#8220;helloworldFunction()&#8221;<span style=\"color: #333333;\">&gt;hello world button&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/span><\/span><\/span><\/span><\/p>\n<p>When you click the button, the webpage alerts you, saying &#8220;hello world&#8221;. The above code is the basis for building a function quiz. Below is the code required to make a function quiz. (Note: the questions and answers shown here are examples, and you can make your own questions and answers. Also, the CSS styling can be made up as well. I used a black background with a border of solid blue and colored the text white.<\/p>\n<p>FUNCTION QUIZ code example:<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;!DOCTYPE html&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">html<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">head<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">font<\/span> <span style=\"color: #339966;\">color<\/span>=<span style=\"color: #b3a56d;\">&#8220;#ffffff&#8221;<\/span>&gt;&lt;<span style=\"color: #ff0000;\">title<\/span>&gt;Quiz&lt;\/<span style=\"color: #ff0000;\">title<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">h1<\/span>&gt;Quiz&lt;\/<span style=\"color: #ff0000;\">h1<\/span>&gt;<br \/>\n&lt;\/<span style=\"color: #ff0000;\">head<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">body<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">style<\/span>&gt;<br \/>\n<span style=\"color: #3366ff;\"><em>background-color<\/em><\/span>: <span style=\"color: #800080;\">#000000<span style=\"color: #333333;\">;<br \/>\n<span style=\"color: #3366ff;\"><em>border<\/em><\/span>: <span style=\"color: #800080;\">2<\/span><span style=\"color: #ff0000;\">px <span style=\"color: #3366ff;\">solid blue<span style=\"color: #333333;\">;<br \/>\n&lt;\/<span style=\"color: #ff0000;\">style<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;1. Which one of these codes is the HEX code for orange?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;#ffffff&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;#FFA500&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;#FF0000&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;#000000&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/span><\/span><\/span><\/span><\/span><\/p>\n<p>&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;2. How many species of birds are found in North America?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;500&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;125&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;213&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;100&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;3. Jays and magpies make up which one of these bird families?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Ardeidae&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Cotingidae&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Hirundinidae&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;Corvidae&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;4. The apple is native to which one of these continents?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Europe&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;North America&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;Asia&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;South America&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;5. What is the name of the ecozone comprising of Europe, western Asia, and Northern Africa called?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;Palearctic ecozone&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Neotropical ecozone&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Indomalayan ecozone&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Australasian ecozone&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;6. What Palezoic period did blastoids go extinct in?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Ordovician&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Carboniferous&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Devonian&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;Permian&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;7. What is the name of the highest mountain in South America?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;Mount Aconcagua&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Mount Huascaran&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Mount Everest&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;K2&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;8. The Netherlands have a large population of what native waterbird, named for its unusual bill?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Grey heron&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Common eider&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;Eurasian spoonbill&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Common scoter&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;9. What time period did Archelon, a giant sea turtle, live in?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;Cretaceous&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Jurassic&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Paleogene&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction&#8221;<\/span>&gt;Neogene&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">p<\/span>&gt;10. Which one of these birds are the New world vultures closely related to?&lt;\/<span style=\"color: #ff0000;\">p<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Old World vultures&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;correctFunction()&#8221;<\/span>&gt;Storks&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Hawks and eagles&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<br \/>\n&lt;<span style=\"color: #ff0000;\">button<\/span> <span style=\"color: #339966;\">onClick<\/span>=<span style=\"color: #b3a56d;\">&#8220;wrongFunction()&#8221;<\/span>&gt;Falcons&lt;\/<span style=\"color: #ff0000;\">button<\/span>&gt;<\/p>\n<p>&lt;<span style=\"color: #ff0000;\">script<\/span>&gt;<\/p>\n<p><em><span style=\"color: #3366ff;\">function <\/span><\/em><span style=\"color: #339966;\">correctFunction() <span style=\"color: #333333;\">{<br \/>\n<\/span><\/span> <span style=\"color: #3366ff;\">alert<span style=\"color: #333333;\">(<span style=\"color: #b3a56d;\">&#8220;Correct!&#8221;<span style=\"color: #333333;\">)<br \/>\n<\/span><\/span><\/span><\/span>}<\/p>\n<p><span style=\"color: #3366ff;\"><em>function <\/em><span style=\"color: #339966;\">wrongFunction() <span style=\"color: #333333;\">{<br \/>\n<\/span><\/span><\/span> <span style=\"color: #3366ff;\"> alert<\/span>(<span style=\"color: #b3a56d;\">&#8220;Wrong&#8221;<\/span>)<br \/>\n}<\/p>\n<p>&lt;\/<span style=\"color: #ff0000;\">script<\/span>&gt;<\/p>\n<p>In the code above, the HTML and CSS style the page, and the Javascript adds interactivity to the buttons created using HTML. The CSS code sets the styling of the page (in this case, a black background with a blue border), and the HTML make the questions as well as the answer buttons. The HTML code is linked to the Javascript code through the onClick property. The Javascript code includes\u00a0the correct and wrong functions and the javascript alerts for correct and wrong selected answers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post I will explain how to create a very simple HTML and Javascript quiz that uses functions. A function is a set of code in Javascript that does a specific task. Below is a example of a function: function\u00a0helloworldFunction()\u00a0 alert(&#8220;Hello world!&#8221;) When you open this code in a browser, the page alerts &#8220;hello [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-412","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Function quiz javascript - Old Bones Journal<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Function quiz javascript - Old Bones Journal\" \/>\n<meta property=\"og:description\" content=\"In this post I will explain how to create a very simple HTML and Javascript quiz that uses functions. A function is a set of code in Javascript that does a specific task. Below is a example of a function: function\u00a0helloworldFunction()\u00a0 alert(&#8220;Hello world!&#8221;) When you open this code in a browser, the page alerts &#8220;hello [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"Old Bones Journal\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-03T21:33:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-08-03T22:43:28+00:00\" \/>\n<meta name=\"author\" content=\"Ananth Ramaswamy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ananth Ramaswamy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/\"},\"author\":{\"name\":\"Ananth Ramaswamy\",\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/#\/schema\/person\/608ff064d2ae9e48409db6b4f83d2a61\"},\"headline\":\"Function quiz javascript\",\"datePublished\":\"2016-08-03T21:33:39+00:00\",\"dateModified\":\"2016-08-03T22:43:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/\"},\"wordCount\":864,\"commentCount\":0,\"articleSection\":[\"Family Anatidae\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/\",\"url\":\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/\",\"name\":\"Function quiz javascript - Old Bones Journal\",\"isPartOf\":{\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/#website\"},\"datePublished\":\"2016-08-03T21:33:39+00:00\",\"dateModified\":\"2016-08-03T22:43:28+00:00\",\"author\":{\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/#\/schema\/person\/608ff064d2ae9e48409db6b4f83d2a61\"},\"breadcrumb\":{\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wenzo.net\/oldbonesjournal\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Function quiz javascript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/#website\",\"url\":\"https:\/\/wenzo.net\/oldbonesjournal\/\",\"name\":\"Old Bones Journal\",\"description\":\"Tales of a budding paleontologist\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wenzo.net\/oldbonesjournal\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/#\/schema\/person\/608ff064d2ae9e48409db6b4f83d2a61\",\"name\":\"Ananth Ramaswamy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wenzo.net\/oldbonesjournal\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b54690981877631010aa7e66cc8981144bf9f317aedb06480c95562b12b6fa91?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b54690981877631010aa7e66cc8981144bf9f317aedb06480c95562b12b6fa91?s=96&d=mm&r=g\",\"caption\":\"Ananth Ramaswamy\"},\"description\":\"Ananth Ramaswamy is a naturalist who loves Paleontology and Ornithology. His first favorite subject is Paleontology. He knows a lot and is quite obsessed. Aditi, his sister, always says that his first movie choice would be something like Walking With Prehistoric Beasts, the movie that shows life after the dinosaurs and the mammal\u2019s Evolution. He would also see Walking With Dinosaurs or Walking With Monsters, The movies which tell life during and before the dinosaurs. For Ornithology, which he talks about more, was one of the two main reasons that he made this blog.\",\"sameAs\":[\"http:\/\/oldbonesjournal.com\"],\"url\":\"https:\/\/wenzo.net\/oldbonesjournal\/author\/ananth\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Function quiz javascript - Old Bones Journal","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Function quiz javascript - Old Bones Journal","og_description":"In this post I will explain how to create a very simple HTML and Javascript quiz that uses functions. A function is a set of code in Javascript that does a specific task. Below is a example of a function: function\u00a0helloworldFunction()\u00a0 alert(&#8220;Hello world!&#8221;) When you open this code in a browser, the page alerts &#8220;hello [&hellip;]","og_url":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/","og_site_name":"Old Bones Journal","article_published_time":"2016-08-03T21:33:39+00:00","article_modified_time":"2016-08-03T22:43:28+00:00","author":"Ananth Ramaswamy","twitter_misc":{"Written by":"Ananth Ramaswamy","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/#article","isPartOf":{"@id":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/"},"author":{"name":"Ananth Ramaswamy","@id":"https:\/\/wenzo.net\/oldbonesjournal\/#\/schema\/person\/608ff064d2ae9e48409db6b4f83d2a61"},"headline":"Function quiz javascript","datePublished":"2016-08-03T21:33:39+00:00","dateModified":"2016-08-03T22:43:28+00:00","mainEntityOfPage":{"@id":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/"},"wordCount":864,"commentCount":0,"articleSection":["Family Anatidae"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/","url":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/","name":"Function quiz javascript - Old Bones Journal","isPartOf":{"@id":"https:\/\/wenzo.net\/oldbonesjournal\/#website"},"datePublished":"2016-08-03T21:33:39+00:00","dateModified":"2016-08-03T22:43:28+00:00","author":{"@id":"https:\/\/wenzo.net\/oldbonesjournal\/#\/schema\/person\/608ff064d2ae9e48409db6b4f83d2a61"},"breadcrumb":{"@id":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wenzo.net\/oldbonesjournal\/2016\/08\/03\/function-quiz-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wenzo.net\/oldbonesjournal\/"},{"@type":"ListItem","position":2,"name":"Function quiz javascript"}]},{"@type":"WebSite","@id":"https:\/\/wenzo.net\/oldbonesjournal\/#website","url":"https:\/\/wenzo.net\/oldbonesjournal\/","name":"Old Bones Journal","description":"Tales of a budding paleontologist","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wenzo.net\/oldbonesjournal\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wenzo.net\/oldbonesjournal\/#\/schema\/person\/608ff064d2ae9e48409db6b4f83d2a61","name":"Ananth Ramaswamy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wenzo.net\/oldbonesjournal\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b54690981877631010aa7e66cc8981144bf9f317aedb06480c95562b12b6fa91?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b54690981877631010aa7e66cc8981144bf9f317aedb06480c95562b12b6fa91?s=96&d=mm&r=g","caption":"Ananth Ramaswamy"},"description":"Ananth Ramaswamy is a naturalist who loves Paleontology and Ornithology. His first favorite subject is Paleontology. He knows a lot and is quite obsessed. Aditi, his sister, always says that his first movie choice would be something like Walking With Prehistoric Beasts, the movie that shows life after the dinosaurs and the mammal\u2019s Evolution. He would also see Walking With Dinosaurs or Walking With Monsters, The movies which tell life during and before the dinosaurs. For Ornithology, which he talks about more, was one of the two main reasons that he made this blog.","sameAs":["http:\/\/oldbonesjournal.com"],"url":"https:\/\/wenzo.net\/oldbonesjournal\/author\/ananth\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/posts\/412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/comments?post=412"}],"version-history":[{"count":3,"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/posts\/412\/revisions"}],"predecessor-version":[{"id":415,"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/posts\/412\/revisions\/415"}],"wp:attachment":[{"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/media?parent=412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/categories?post=412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wenzo.net\/oldbonesjournal\/wp-json\/wp\/v2\/tags?post=412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}