Private variable,after execute it says undefined


function Person(first,last,age) {
   this.firstname = first;
   this.lastname = last;
   this.age = age;
   var bankBalance = 7500;
var john = new Person('Sudeep', 'sagar', 22)
// create your Person 
var myFirst = john.fisrt;
var myLast = john.lastName;
var myAge = john.age;



Hi it's not a error it's right that it says undefined because it's a private variable on the next lesson you will learn how to print a private variable


yeah. I got it :slight_smile: