This language bar is your friend. Select your favorite languages!
Edit summary for version 36 :
New JS implementation by user [glmdgrielson]

Version 35

Version 36

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Imports
const util = require("util");
Code
console.error(util.format("%d is negative", -2));
// or alternatively:
console.error(-2, " is negative");
Doc URL
https://nodejs.org/api/console.html#console_console_error_data_args