Complete the code to declare a function that returns nothing.
function greet(): [1] { console.log("Hello!"); }
The void type means the function does not return any value.
Complete the code to declare a function type that returns void.
let logMessage: () => [1]; logMessage = () => console.log("Log");
The function type () => void means it takes no arguments and returns nothing.
Fix the error in the function declaration to indicate it returns nothing.
function showAlert(): [1] { alert("Warning!"); }
The function should return void because it does not return a value.
Fill both blanks to declare a function type that takes a string and returns void.
type Logger = (message: [1]) => [2];
The function type Logger takes a string argument and returns nothing (void).
Fill all three blanks to create a function that takes a number and a string and returns void.
function processInput(id: [1], name: [2]): [3] { console.log(`ID: ${id}, Name: ${name}`); }
The function processInput takes a number and a string as parameters and returns nothing (void).
