{"id":309,"date":"2018-04-09T21:05:52","date_gmt":"2018-04-09T15:05:52","guid":{"rendered":"https:\/\/mcqacademy.com\/en\/mcq\/what-will-be-output-in-console-var-animals-tiger-lion-camel-cow-duck-console-loganimals-slice2-4\/"},"modified":"2018-04-09T21:05:52","modified_gmt":"2018-04-09T15:05:52","slug":"what-will-be-output-in-console-var-animals-tiger-lion-camel-cow-duck-console-loganimals-slice2-4","status":"publish","type":"mcq","link":"https:\/\/mcqacademy.com\/en\/mcq\/what-will-be-output-in-console-var-animals-tiger-lion-camel-cow-duck-console-loganimals-slice2-4\/","title":{"rendered":"What will be output in console: var animals = [&#8216;Tiger&#8217;, &#8216;Lion&#8217;, &#8216;Camel&#8217;, &#8216;Cow&#8217;, &#8216;Duck&#8217;]; console.log(animals.slice(2, 4));"},"content":{"rendered":"<p>What will be output in console:<\/p>\n<pre>var animals = ['Tiger', 'Lion', 'Camel', 'Cow', 'Duck'];\r\nconsole.log(animals.slice(2, 4));<\/pre>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","topic":[127,303],"subject":[17],"class_list":["post-309","mcq","type-mcq","status-publish","hentry","topic-basic-javascript","topic-javascript-arrays","subject-javascript"],"mcq_note":"<pre>var animals = ['Tiger', 'Lion', 'Camel', 'Cow', 'Duck'];\r\nconsole.log(animals.slice(2, 4));<\/pre>\r\nOutput in console will be\u00a0<code>Array [\"Camel\", \"Cow\"]<\/code>.\u00a0The <code>slice()<\/code> method returns a shallow copy of a portion of an array into a new array object selected from specified position to the end (excluding the end position) of array.","mcq_options":[{"right":"no","answer":"<code>Array [\"Lion\", \"Camel\", \"Cow\", \"Duck\"]<\/code>"},{"right":"no","answer":"<code>Array [\"Camel\", \"Cow\", \"Duck\"]<\/code>"},{"right":"yes","answer":"<code>Array [\"Camel\", \"Cow\"]<\/code>"},{"right":"no","answer":"<code>Array [\"Cow\", \"Duck\"]<\/code>"}],"multi_answers":"no","subject_terms":[{"id":17,"title":"JavaScript","slug":"javascript"}],"topic_terms":[{"id":127,"title":"Basic JavaScript","slug":"basic-javascript"},{"id":303,"title":"JavaScript Arrays","slug":"javascript-arrays"}],"_links":{"self":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/mcq\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/mcq"}],"about":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/types\/mcq"}],"author":[{"embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/comments?post=309"}],"wp:attachment":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"topic","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/topic?post=309"},{"taxonomy":"subject","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/subject?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}