Sure, here's a simple code snippet in JavaScript that prints "Hello, world!" to the console:
console.log("Hello, world!");
You can run this code in a JavaScript environment, such as a browser console or a Node.js environment, and it will display "Hello, world!" as the output.