Open this example in the interactive library
Source code
const month = 8;
console.log("Q" + (1 + Math.floor((month - 1) / 3)));
Sample output
Q3

Open this example in the interactive library
const month = 8;
console.log("Q" + (1 + Math.floor((month - 1) / 3)));
Q3