What makes this function expect a boolean value as an argument?

Hi I am wondering if someone could explain to me why in this exercise, one of the functions is expecting a boolean value as an argument. Am i just missing something to do with the syntax or is there something else going on?

let cookTheBeans = (isSoftened) => {
return new Promise((resolve, reject) => {
console.log(‘Time to cook the beans.’);
if (isSoftened) {
console.log(‘… The beans are cooked!’);
resolve(‘\n\nDinner is served!’);
}, 1000);

The exercise is Handling dependent promises, within the Async part of front end development course.
There doesn’t seem to be any other reference to the function itself. it appears self contained. So i am wondering why (isSoftened) a boolean? I understand what the code is doing, i just don’t know why its expecting it to be a boolean and not a variable or something else.

The isSoftened argument is passed into the cookTheBeans function so that the function knows, when it’s called, whether the beans have been softened. If the beans have been softened (i.e. if the argument passed into cookTheBeans is true), then the beans will cook in the allotted time. Typically speaking, a variable or function argument that starts with "is" is a boolean.

Hi thanks for the reply. I posted the same problem into the codecademy discord group in which a couple of people ran through and helped guide me with the logic. I initially thought that the IF statements return value inside the cookTheBeans function was the reason for the value, but someone pointed out as you have also that it is in fact the chain of Promises that are passing the values down. Thanks for taking the time to reply.