how to check if a number is negative in p5.js

JavaScript
sign()
Source

Also in JavaScript: