Loading, please wait...
🚀 Now Available on Google Play

VTU Circle

Your complete VTU student companion. Check VTU results, track SGPA & CGPA, access study resources, stay updated with VTU notifications, and connect with classmates—all in one simple and fast app.

📊 VTU Results 🎯 SGPA & CGPA 📄 Result PDF 📈 Analytics 📚 Notes 📖 Syllabus 📝 Question Papers 🛠 Study Tools 🔔 VTU Updates 🏆 Rankings 👥 Classmates 💬 Chat
Download on Google Play

BIS601 Program 3

PROGRAM:

let student = {
    name: "John Doe",
    grade: 85,
    subjects: ["Math", "Science", "English"],
    
    
    displayInfo: function() {
        console.log(`Name: ${this.name}`);
        console.log(`Grade: ${this.grade}`);
        console.log(`Subjects: ${this.subjects.join(', ')}`);
    }
};

student.passed = student.grade >= 50;
student.displayInfo();

for (let key in student) {
    if (typeof student[key] !== 'function') {
        console.log(`${key}: ${student[key]}`);
    }
}

Step 4: To run program use below command:

  • Open the vscode integrated terminal through the menu by selecting and type the below command to run the program.
node index.js

OUTPUT:

Name: John Doe
Grade: 85
Subjects: Math, Science, English
name: John Doe
grade: 85
subjects: Math,Science,English
passed: true
guest
0 Comments
0
Would love your thoughts, please comment.x
()
x
Syllabus Papers
SGPA CGPA