var current = new Date(); // this one's pretty self explanatory
console.log('current: ' + current);
var last = new Date();
last.setMonth(last.getMonth() + 1); // go to next month
last.setDate(0); // setting date to 0 is last day of previous month
console.log('last: ' + last);
var first = new Date();
first.setDate(1); // setting date to 1 is first day of current month
console.log('first: ' + first);
Run Code Online (Sandbox Code Playgroud)