In Vs.net 2010,2015 and other versions, add code hints \ comments to the JS function

Source: Internet
Author: User

Often write JS friends often because of the function of writing more, after a period of time will forget the purpose of the function, or the function of the parameters of the situation, this time will be associated with the powerful hint of the VS tool function, much hope can also be realized on js, tell you, this idea is not much difficult, VS2010 to help us solve this problem, below to see how the specific operation:

1 <Script>2     functionsayhi (name, Age) {3          ///<summary> Self Introduction to the function of name and age </summary>4          ///<param name= "name" type= "String" > name to introduce </param>5          ///<param name= "age" type= "int" > ages to introduce </param>6          varStr= "Hello everyone, my name is:" +name+ ", I this year" + age+ "years";7 Alert (str);8      }9 </Script>

Notice that the above code has summary, param English font, its summary is to record the function, param is the parameter in the method, name is the parameter name, type is the parameter of the types >< intermediate is the relevant description of the Parameter.
So that after a period of time, and then come back to use this code, we can get hints and understand the function through these records, not to go to the function of the code to see half a day.
below to see the effect of the hint, really very good.

In Vs.net 2010,2015 and other versions, add code hints \ comments to the JS function

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.