Does the @ symbol mean anything in javascript?

后端 未结 4 358
误落风尘
误落风尘 2021-01-29 04:48

I noticed the @ symbols mentioned in many javascript files and couldn\'t figure out the significance of this character there. for example:

/**
    * Call         


        
相关标签:
4条回答
  • 2021-01-29 05:08

    that is a javadoc style comment. look at the javadoc documentation

    0 讨论(0)
  • 2021-01-29 05:14

    It's only for documentation purpose.

    @param is here to indicate which param your function will take for exemple. There is few more, like @author, etc.

    0 讨论(0)
  • 2021-01-29 05:18

    @param tag Specifies information for a parameter in a function or method.

    link : https://docs.microsoft.com/en-us/visualstudio/ide/create-jsdoc-comments-for-javascript-intellisense?view=vs-2015

    0 讨论(0)
  • 2021-01-29 05:28

    That comment is JSDoc. The @param callbackfn means "what follows is the description of the argument callbackfn".

    Your IDE might be able to parse that format or you can use jsdoc to generate documentation from that.

    0 讨论(0)
提交回复
热议问题