What will be the output of the following code?
const date = new Date('2022-05-31'); console.log(date.getMonth());
3
6
5
4