Consider the below code snippet and predict the output of it. Assume that all the required setup is done.

   <div id="app">
        <h3>User Details</h3>
        {{getBioData()}}
    </div>
    <script>
        const { createApp } = Vue
        var bioData = { userName: "Sam", placeOfBirth: "New York", age: 34 };
        const app = createApp({
            data() {
                return { bioData }
            },
            methods: {
                getBioData: () => {
                    return "User Name: " + this.userName + " User Age: " + this.age;
                },
            }
        }).mount('#app')
    </script>

User Details

User DetailsĀ 

User Name: Marry User Age: 34

User DetailsĀ 

User Name : User Age :

User DetailsĀ 

User name : undefined User age : undefined

Verified Answer
Correct Option - d

To get all Infosys Certified VueJS Professional Exam questions Join Telegram Group https://bit.ly/infy_premium_group

Telegram

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in

Updated on Sun, 6 Jul 2025