Skip to main content

Why API Documentation required on JS?

JavaScript Doc is the de facto standard for documenting JavaScript code. During my development period, I have worked with more than 50’s of JavaScript Libraries; after dealing with so many documentation, I found a lot of issues with JavaScript documentation. As lagging behind Good documentation, development time increases. A good documentation will decrease development time and it makes the developers life easy. It is very simple and easy to integrate with the system. Whatever the reason, not documenting an application is never a good thing, even if it is usually something of a chore.

This documentation will help you to understand the project and its flow, without looking into the actual code in very less time. All the entities described in document will also give link to the code of that particular entity. Let’s have a look for some of the commonly used annotations enlisted below:
Sr. No.
Marks the functions as the constructor.
To show a function or method, locally or globally.
To show the parameter of a function.
To indicate the implementing interface or extending class of current class.
Used to enlist return value from a function.
Shows that an object creating a namespace for its members.
To show the member or it’s type.
To show the parent of the member.

JSDoc is like an API documentation processor for the JavaScript. As a tool, JSDoc takes JavaScript code with special /** */ comments and produces HTML documentation for it. For example: Given the following code.


The generated HTML looks as follows in a web browser:


Documentation is still scarce, but I hope this post help you how to run JavaScript Doc and how its syntax works, also very helpful in decreasing development time.


Popular posts from this blog

Where have you seen Machine Learning in your everyday life?

1 –  Google’s AI-Powered Predictions Using anonymized location data from smartphones, Google Maps (Maps) can analyze the speed of movement of traffic at any given time. And, with its acquisition of crowdsourced traffic app Waze in 2013, Maps can more easily incorporate user-reported traffic incidents like construction and accidents. Access to vast amounts of data being fed to its proprietary algorithms means Maps can reduce  commutes by suggesting the fastest routes to and from work. 2 –  Ridesharing Apps Like Uber and Lyft How do they determine the price of your ride? How do they minimize the wait time once you hail a car? How do these services optimally match you with other passengers to minimize detours? The answer to all these questions is ML. Engineering Lead for Uber ATC Jeff Schneider  discussed in an NPR interview how the company uses ML to predict rider demand to ensure that “surge pricing”(short periods of sharp price increases to decrease rider demand and increase driver supply…

How does a total beginner start to learn machine learning if they have some knowledge of programming languages?

I work with people who write C/C++ programs that generate GBs of data, people who manage TBs of data distributed across giant databases, people who are top notch programmers in SQL, Python, R, and people who have setup an organization wide databases working with Hadoop, Sap, Business Intelligence etc. My inspiration to anyone and everyone would be following: Learn all the basics from Coursera, but if I really have to compare what you would get out of Coursera compared to the vastness of data science, let us say ~ Coursera is as good as eating a burrito at Chipotle Mexican Grill. You certainly can satiate yourself, and you have a few things to eat there.The pathway to value adding data science is really quite deep, and I consider it equivalent to a five star buffet offering 20 cuisines and some 500 different recipes.Coursera is certainly a good starting point, and one should certainly go over these courses, but I personally never paid any money to Coursera, and I could easily learn a v…

Why do we need Machine Learning?

Every time, it is seen that whenever you opens a browser, you will find someone written about machine learning. About applications to self-driving cars, everything is covered in a articles and blogs. So many companies are focusing towards "Machine Learning as the Future" but what does that really mean? Machine learning is the idea that there are generic algorithms that can tell you something interesting about a set of data without you having to write any custom code specific to the problem. Instead of writing code, you feed data to the generic algorithm and it builds its own logic based on the data. Think of machine learning like this. As a human, and as a user of technology, you complete certain tasks that require you to make a decision or classify something. For instance, when you read your inbox in the morning, you decide to mark that ‘Win a Free Cruise if you click here’ email as spam. How would a computer know to do the same thing? Machine learning is comprised of algori…