Modern Application Development II, Quiz 1
Consider the following HTML, with the correct Vue 2 CDN links included.
<body> <div id="app" :class="['box', { active: isActive }]"> Vue Component </div> <script> new Vue({ el: '#app', data() { return { isActive: false, }; }, }); </script></body>What will be the final rendered class attribute of the <div> ?
Consider the following HTML, with the correct Vue 2 CDN links included. <body> <div id="app" :class="['box', { active: isActive }]"> Vue Component </div> <script> new Vue({ el: '#app', data() { return { isActive: false, }; }, }); </script> </body> What will be the final rendered class attribute of the `<div>` ? Which of the following is an example of ephemeral state in a web application? Consider the following JavaScript code const juices = [ { id: 1, name: "grape", rating: 8.1 }, { id: 2, name: "apple", rating: 5.0 }, { id: 3, name: "orange", rating: 6.9 }, { id: 4, name: "banana", rating: 10 }, ] mapping = { "4": 1, "3": 2, "2": 3, "1": 4 } juices.map((juice) => { return { ...juice, rank: mapping[juice.id] } }) .sort((a, b) => a.rank - b.rank) .map((juice) => { console.log(juice.name) }) What will be the output of the code?