Skip to content

planet.ts

github-actions[bot] edited this page Jul 17, 2024 · 4 revisions

Functions

addMoon(element)void

Add a new section for adding a moon to a planet.

enableMoonAdd()void

Enables the add button for moonInputs and triggers the moonList function

moonList()undefined

Populates the moon list in the output with the current values of the moonInputs.

plural(number, [dest])string

Determines the appropriate verb to use based on the given number, and sends the output to the specified destination if provided.

moonSentence()void

Generates a sentence describing the moons of the current planet.

addMoon(element) ⇒ void

Add a new section for adding a moon to a planet.

Kind: global function

Param Type Description
element HTMLElement

The element that triggered the addition of the moon section.

enableMoonAdd() ⇒ void

Enables the add button for moonInputs and triggers the moonList function

Kind: global function

moonList() ⇒ undefined

Populates the moon list in the output with the current values of the moonInputs.

Kind: global function

plural(number, [dest]) ⇒ string

Determines the appropriate verb to use based on the given number, and sends the output to the specified destination if provided.

Kind: global function
Returns: string -

Either "is" or "are," depending if the number is singular or plural.

Param Type Description
number number

The number used to decide which verb to use.

[dest] string

An optional destination to send the output of the wikiCode() function to.

moonSentence() ⇒ void

Generates a sentence describing the moons of the current planet.

Kind: global function
Returns: void -

  • Sentence describing the planet's moons.
Clone this wiki locally