const chalk = require('chalk'); console.log(chalk.red('This text will be red!'));
const chalk = require('chalk'); const message = 'Error! Something went wrong'; const formattedMessage = chalk.red.bold(message); console.log(formattedMessage);In this example, we create a `message` variable and then use the `chalk.red.bold()` methods to set the color to red and make the text bold. We then log the formatted message to the console. Package Library: chalk