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