If statement and for JavaScript loop


I would like my program to simulate a library system in which I can borrow a book for 7 days and automatically re-borrow for 7 days if no one wants the book. but you have to return the book if someone wanted it, I do not know how to activate this condition, if you can help me, that would be very good, thank you.

    leave months = ['Jan']; //

To borrow
leave request = & # 39; & # 39 ;;

months.forEach (month => {// Java Script function.
for (loan = 0; loan <30; loan ++) {// for a loop that you can try
yes (loan === 7) {
console.log (& # 39; Your loan will be transferred & # 39;);
}

yes (loan === 14) {
console.log (& # 39; You have to return the book! & # 39;);
break;
}

console.log ({loan});
}
});