how to create empty function in javascript code example Example: javascript empty function const func = () => {}; // Or const func = Function();