get current month of year in number javascript

JavaScript
var today = new Date();
var month = today.getMonth(); // Returns 9
console.log(month); // Output: 9

Source

Also in JavaScript: