In its current form, I do not see how B is connected in any way with object A [so there are no questions about redefinition there].
if you really want to have something along the line of inheritance:
var B = A B.method1 = function() {
so when you call B.method2() you get A's method, and method1() will get a higher version of B's .
anirvan
source share