{"id":325,"date":"2018-03-16T04:26:28","date_gmt":"2018-03-15T22:26:28","guid":{"rendered":"https:\/\/mcqacademy.com\/en\/mcq\/considering-the-following-snap-of-code-what-is-the-expected-result-3\/"},"modified":"2018-03-16T04:26:28","modified_gmt":"2018-03-15T22:26:28","slug":"considering-the-following-snap-of-code-what-is-the-expected-result-3","status":"publish","type":"mcq","link":"https:\/\/mcqacademy.com\/en\/mcq\/considering-the-following-snap-of-code-what-is-the-expected-result-3\/","title":{"rendered":"Considering the following snap of code, what is the expected result?"},"content":{"rendered":"<p>Considering the following snap of code, what is the expected result?<\/p>\n<pre>let dogName = 'Tom';\r\nlet catName = 'Jerry';\r\n[dogName, catName] = [catName, dogName];\r\nconsole.log(`Dog name: ${dogName}`);<\/pre>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","topic":[155],"subject":[17],"education_level":[],"class_list":["post-325","mcq","type-mcq","status-publish","hentry","topic-ecmascript-6-es6","subject-javascript"],"mcq_note":"<pre>let dogName = 'Tom';\r\nlet catName = 'Jerry';\r\n[dogName, catName] = [catName, dogName];\r\nconsole.log(`Dog name: ${dogName}`);<\/pre>\r\nOn third line the values of <code>dogName<\/code> and <code>catName<\/code> variable will be swap. In\u00a0<strong>EcmaScript 6 (ES6)<\/strong> we don't need a third variable to swap values of two different variable.","mcq_options":[{"right":"no","answer":"String output: <code>Dog name: Tom<\/code>"},{"right":"yes","answer":"String output: <code>Dog name: Jerry<\/code>"},{"right":"no","answer":"Syntax error"},{"right":"no","answer":"String output:  <code>Dog name:<\/code>"}],"multi_answers":"no","subject_terms":[{"id":17,"title":"JavaScript","slug":"javascript"}],"topic_terms":[{"id":155,"title":"EcmaScript 6 (ES6)","slug":"ecmascript-6-es6"}],"_links":{"self":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/mcq\/325","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=325"}],"wp:attachment":[{"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/media?parent=325"}],"wp:term":[{"taxonomy":"topic","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/topic?post=325"},{"taxonomy":"subject","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/subject?post=325"},{"taxonomy":"education_level","embeddable":true,"href":"https:\/\/mcqacademy.com\/en\/wp-json\/wp\/v2\/education_level?post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}