Search Results

Search found 1 results on 1 pages for 'user1314034'.

Page 1/1 | 1 

  • JavaScript return method

    - by user1314034
    I'am new in javascript. I can't understand why the function returns T1 object (not just string 'hi') in the following example. function T1(){ return 'hi'; } function T(){ return new T1(); } T(); output: T1 And returns function in the following example function T1(){ return function(){ return 'hi'; } } function T(){ return new T1(); } T(); output: function (){ return 'hi' } Please explain this rethult. Thank you)

    Read the article

1