The console.warn() static method outputs a warning message to the console at the 'warning' log level.
console.warn()
MDN Reference