round

We’d love to hear your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

Die Funktion round gibt eine Zahl zurück, die die nächste ganze Zahl zum gegebenen Wert ist.

Syntax

round( decimal )

Parameter

decimal

Die Dezimalzahl, die gerundet werden soll.

Rückgabewert

Die nächste ganze Zahl, die kleiner, größer oder gleich decimal ist.

Beschreibung

  • -0.5 wird zu negativem Null gerundet. 0.4 wird zu positivem Null gerundet.

Spezifikationen

Gecko-Unterstützung

Unterstützt.