Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAny one explain the ouput of following JavaScript Code? #1284
Comments
This comment has been minimized.
This comment has been minimized.
|
This is the issue tracker for a particular linting style for JavaScript, and it's not for general JS questions |
LinusU
closed this
May 27, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Soorajgit commentedMay 27, 2019
var count = function ()
{
this.c = 0 ;
var add = function () {
return ++this.c;
};
this.addNum = function (n)
{
for(i= 0; i<n ; i++) {
}
return this.c ;
};
}
Output of this and explanation since i am new JS.
console.log(new count().addNum(10));
or
console.log(new count.add());