Home / Javascript Tips Generated By ChatGPT / Creating a Function in Javascript Functions are reusable blocks of code. Source Code function greet() { console.log('Hello, world!'); }