Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
Here i am getting output as undefined, please tell me why
Minhaj Hussain
Jan 21 2018 2:05 AM
137
Reply
<script type="text/javascript">
function Employee() {
this.Name="Minhaj"
var getName = function() {
return this.Name;
}
this.PrivGetName=function () {
return getName();
}
Employee.prototype.Publicget=function () {
return this.PrivGetName();
}
}
var obj=new Employee();
alert(obj.Publicget());
//OUTPUT IS UNDEFINED
</script>
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
chrome.runtime.sendMessage error “Message length exceeded”
how to set hours,minutes to my date