{"id":571,"date":"2023-11-23T12:51:07","date_gmt":"2023-11-23T12:51:07","guid":{"rendered":"https:\/\/exampracticetests.com\/c\/FC0-U61\/comptia-it-fundamentals-fc0-u61-question160\/"},"modified":"2023-11-23T12:51:07","modified_gmt":"2023-11-23T12:51:07","slug":"comptia-it-fundamentals-fc0-u61-question160","status":"publish","type":"post","link":"https:\/\/exampracticetests.com\/c\/FC0-U61\/comptia-it-fundamentals-fc0-u61-question160\/","title":{"rendered":"CompTIA IT Fundamentals FC0-U61 &#8211; Question160"},"content":{"rendered":"<div class=\"question\">A developer is troubleshooting code in an application. The code is supposed to return the word &quot;vegetables&quot; if<br \/>\nthe category id is only 2. However, the code is returning vegetables for all values except category id 1. Which of<br \/>\nthe following code statements would BEST correct the issue?<br \/>\n<br \/><strong><br \/>A.<\/strong> If category id = 1 then &#039;Fruit&#039;<br \/>\n    Else &#039;Vegetables&#039;<br \/>\n<br \/><strong>B.<\/strong> If category id = 1 then &#039;Fruit&#039;<br \/>\n    Else if category id = 2 then &#039;Vegetables&#039;<br \/>\n    Else &#039;Candy&#039;<br \/>\n<br \/><strong>C.<\/strong> If category id &lt;&gt; 1 then &#039;Vegetables&#039;<br \/>\n    Else &#039;Fruit&#039;<br \/>\n<br \/><strong>D.<\/strong> If category id = 1 then &#039;Fruit&#039;<br \/>\n    Else if category id &gt;= 2 then &#039;Vegetables&#039;<br \/>\n    Else &#039;Candy&#039;<\/div>\n<p><\/p>\n<style> .hidden-div{ display:none } <\/style>\n<p>\t\t\t\t\t\t\t<button onclick=\"getElementById('hidden-div').style.display = 'block'\"> Show Answer <\/button> <button onclick=\"getElementById('hidden-div').style.display = 'none'\">Hide Answer<\/button><\/p>\n<div class=\"hidden-div\" id=\"hidden-div\"><span style=\"\"><\/p>\n<div class=\"answer\">Correct Answer: <strong>B<\/strong><\/div>\n<p><\/strong><\/span> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>A developer is troubleshooting code in an application. The code is supposed to return the word &quot;vegetables&quot; if the category id is only 2. However, the code is returning vegetables for all values except category id 1. Which of the following code statements would BEST correct the issue? A. If category id = 1 then [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3,163],"class_list":["post-571","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-comptia-it-fundamentals-fc0-u61","tag-question-160"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/exampracticetests.com\/c\/FC0-U61\/wp-json\/wp\/v2\/posts\/571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exampracticetests.com\/c\/FC0-U61\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exampracticetests.com\/c\/FC0-U61\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/c\/FC0-U61\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/c\/FC0-U61\/wp-json\/wp\/v2\/comments?post=571"}],"version-history":[{"count":0,"href":"https:\/\/exampracticetests.com\/c\/FC0-U61\/wp-json\/wp\/v2\/posts\/571\/revisions"}],"wp:attachment":[{"href":"https:\/\/exampracticetests.com\/c\/FC0-U61\/wp-json\/wp\/v2\/media?parent=571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exampracticetests.com\/c\/FC0-U61\/wp-json\/wp\/v2\/categories?post=571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exampracticetests.com\/c\/FC0-U61\/wp-json\/wp\/v2\/tags?post=571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}