Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 241 Bytes

Opposite number.md

File metadata and controls

18 lines (14 loc) · 241 Bytes

Description:

Very simple, given an integer or a floating-point number, find its opposite.

Examples (input --> output):

1: -1
14: -14
-34: 34

Solution:

function opposite(number) {
  return(-number);
}