linux1880 Posted May 28, 2011 Share Posted May 28, 2011 is this javascript object or function ? var test = { name: 'me', age: 23, parent: function(){ var x = 'sabai'; return x; }, }; document.write(test.parent()); Quote Link to comment https://forums.phpfreaks.com/topic/237700-is-this-javascript-object-or-function/ Share on other sites More sharing options...
requinix Posted May 28, 2011 Share Posted May 28, 2011 "this" is an object. test is also an object, and test.parent is a function. Quote Link to comment https://forums.phpfreaks.com/topic/237700-is-this-javascript-object-or-function/#findComment-1221510 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.