The call in JavaScript is for a different class.

Source: Internet
Author: User

I will not ' use strict ', so the article is not rigorous. Originally, the current JavaScript is what you love to see it what it is.

For example, what do you think of this remark:

var o = new SomeClass ();

Create a pair of classes, yes. At first glance, you don't know if this is C # or JavaScript. What about the definition of this class?

function SomeClass () {  (function SomeClass () {    console.log (' SomeClass Constructor ');  }) ();}

I know no one's playing JavaScript like that. So here's the problem, C # You don't have the ability to give a pair of like-change classes, but JavaScript lines.

var obj = new SomeClass (); Anotherclass.call (obj);

At this point, obj is replaced with a anotherclass, called by the class, obj, which is already a anotherclass class of the image. Ya obj will be re-anotherclass, execute the constructor of the first time.

So, the call in JavaScript is for the like-to-change class.

-----------------------------------------------

It's not the same thing.

In JavaScript, all function is the pair of function classes. So SomeClass is the class, and also the image. So in JavaScript, the class is also a pair of images.

C #, you kind of like a try?

So JavaScript is inherently a functional language. how nice.

-----------------------------------------------

It's not the same thing.

In C #, Type and Class, just like Attributes and Properties, I'm too lazy to get a distinction. The philosophical view of asking this question is not normal, you ask C # how to differentiate. In JavaScript there is no chance to differentiate, the typeof operator is a waste, and class is not a class.

JavaScript you got a Curry for me? You don't even have a pipe.

-----------------------------------------------

It's not the same thing.

Not being rigorous is not an excuse to be baloney.

JavaScript is javascript because of the prototype.

Truth.

So the call in Javascipt is used to play polymorphic.

This is the secret of call.

This is the real polymorphic, this is the most bull cunt polymorphic. Tonight you want me to be the baby, I am the baby, you think I am the ice, I am the ice son. Who you want, call, follow the call.

Okay, so here's the question. What is the event?

You guessed it.

------------------------------------------------

Today, as a new identity, back to the Microsoft Asia-Pacific Research and Development Group building. Huang Jianxiang agitation effect by Microsoft's fake to sell to all the same. But sports, like the media, are good churches. Can do things.

The call in JavaScript is for a different class.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.