screen_rotation
Copied to Clipboard
<html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <h3>Vue Js check property exist in object using in operator</h3> <div id="app"> <p v-if="'age' in person">Age: {{ person.age }}</p> <p v-else>No age information available.</p> </div> <script type="module"> const app = new Vue({ el: "#app", data() { return { person: { name: 'John', occupation: 'Developer' } }; }, }); </script> </body> </html>