Home / Javascript Tips Generated By ChatGPT / Creating Default Function Parameters in Javascript Provide default values for function parameters. Source Code function greet(name = "Guest") { console.log(`Hello, ${name}!`); } greet(); // "Hello, Guest!" greet("John"); // "Hello, John!"