Yes it is possible.
Go to the masterPage.js (assuming you wish to log it to the console on every page of your website, and put there something like:
console.log("%cStop!", "color: red; font-size: 65px; font-wieght: bold; text-shadow: 2px 2px #000000; font-family:Poppins");
console.log("%cThis is a browser feature intended for developers. If someone told you to copy-paste something here to enable any feature or \"hack\" someone's account, it is a scam and will give them access to your own account.", "color: yellow; background-color:red;font-size: 35px;")