Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5933327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:57:28+00:00 2026-05-22T14:57:28+00:00

According to the JSDoc wiki for @param you can indicate a @param is optional

  • 0

According to the JSDoc wiki for @param you can indicate a @param is optional using

/**
    @param {String} [name]
*/
function getPerson(name) {
}

and you can indicate a param inline using

function getPerson(/**String*/ name) {
}

And I can combine them like the following, which works ok.

/**
    @param [name]
*/
function getPerson(/**String*/name) {
}

But I would like to know if there is a way to do it all inline if possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:57:29+00:00Added an answer on May 22, 2026 at 2:57 pm

    I found a way to do this using Google Closure Compiler type expressions. You put an equals sign after the type like so:
    function test(/**String=*/arg) {}

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to select name from system_privilege_map System has been granted: SELECT ANY TABLE ...and
According to what I have found so far, I can use the following code:
According to the feedparser documentation , I can turn an RSS feed into a
According to the dojo docs, dijit.layout.AccordionPane is deprecated in favor of dijit.layout.ContentPane link: http://api.dojotoolkit.org/jsdoc/1.3.2/dijit.layout.AccordionPane
According to my class notes, you can allocate an array in C++ like int
According to wiki, VHD (Virtual Hard Disk) may contain what is found on a
According to the MSDN documentation , a ribbon:RibbonControlSizeDefinition can be used to control the
According to http://www.bennadel.com/blog/1892-You-Cannot-Bind-The-Submit-Event-To-Objects-Using-jQuery.htm It is a bug: I am pretty sure this is a
According documentation: System.Array.Sort<T> - sorts the elements in an entire System.Array using the System.IComparable
According to the documentation i would like to overwrite predefined formats using this settings:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.