Jump to content

javascript em septiri em septhiri


yomama

Recommended Posts

11 minutes ago, yomama said:

35 to 39 mind blown. Execution environment kathal kathal undi ga

Javascript has some wierd parts especially for Object oriented javascripts part , Javascript's "this" and "prototype" make it really complex  .. ES6 trying to make it little easy for developers , typescript also add some great features but sometime you loss control if you see generated javascript from typescript 

Link to comment
Share on other sites

1 minute ago, sri_india said:

Javascript has some wierd parts especially for Object oriented javascripts part , Javascript's "this" and "prototype" make it really complex  .. ES6 trying to make it little easy for developers , typescript also add some great features but sometime you loss control if you see generated javascript from typescript 

Auna es6 gurinchi vinna..next react js kuda start cheyali. Dinemma there are so many skills u will be overwhelmed by js aite bavundi so far...

Link to comment
Share on other sites

try to execute this code ... classic example of javascript's "this" hell :)

 

function someFunc(number) {
    console.log( "from someFunc: " + (number);
 
    this.counter++;
}

someFunc.counter = 0;

var i;

for (i=0; i<10; i++) {
    if (i > 5) {
        someFunc( i );
    }
}

console.log(someFunc.counter)

Link to comment
Share on other sites

5 minutes ago, yomama said:

Auna es6 gurinchi vinna..next react js kuda start cheyali. Dinemma there are so many skills u will be overwhelmed by js aite bavundi so far...

ES6  is next version of ECMA Script .... Javascript follows ecma standard but after much popularity people start using Javascript name for ecma script .... now new verion of ES6 is coming with this  they are introducing classes , constructors , scope and  new variable types (called let) etc...  this defiantly going to make lot of changes to current javascript 

Link to comment
Share on other sites

13 minutes ago, sri_india said:

try to execute this code ... classic example of javascript's "this" hell :)

 

function someFunc(number) {
    console.log( "from someFunc: " + (number);
 
    this.counter++;
}

someFunc.counter = 0;

var i;

for (i=0; i<10; i++) {
    if (i > 5) {
        someFunc( i );
    }
}

console.log(someFunc.counter)

012345 vastay log lo ? hell enduk?

Link to comment
Share on other sites

27 minutes ago, yomama said:

first iteration ki munde calling console log kada ?

inside consol log kadhu loop ayipoyakaa inko consol log undi ... it supposed to print 5 as counter value is incremented for each for loop iteration but it still print 0 .... 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...