Start of main content## Recommended snippets

Converts an angle from radians to degrees.

- Use
`Math.PI`

and the radian to degree formula to convert the angle from radians to degrees.

`const radsToDegrees = rad => (rad * 180.0) / Math.PI;`

`radsToDegrees(Math.PI / 2); // 90`

### Degrees to radians

JavaScript, Math

Converts an angle from degrees to radians.

### Digitize number

JavaScript, Math

Converts a number to an array of digits, removing its sign if necessary.

### Integer to roman numeral

JavaScript, Math

Converts an integer to its roman numeral representation. Accepts value between

`1`

and`3999`

(both inclusive).