function confirm
#confirm(message?: string): booleanShows the given message and waits for the answer. Returns the user's answer as boolean.
Only y and Y are considered as true.
If the stdin is not interactive, it returns false.
Examples #
#
const shouldProceed = confirm("Do you want to proceed?");
// If the user presses 'y' or 'Y', the result will be true
// If the user presses 'n' or 'N', the result will be false
console.log("Should proceed?", shouldProceed);
Parameters #
#message: string optional
Return Type #
boolean