April 18, 2012

Coding standards for documenting javascript function

Question by tamakisquare

Possible Duplicate:
What options are available for documenting your Javascript code?

In Python, to document a function, there is Docstring (example below)

def complex(real=0.0, imag=0.0):
    """Form a complex number.

    Keyword arguments:
    real -- the real part (default 0.0)
    imag -- the imaginary part (default 0.0)

    """
    if imag == 0.0 and real == 0.0: return complex_zero
    ...

Wondering what’s the coding standards I should follow for documenting function in javascript.

Answer by Starx

Read this excellent articles to know about the ways to document in JS.

Also check this question What tools are available for documenting JavaScript?

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!