A somewhat fun and scary way to create a new document in InDesign. Take a look at all those ((()=>{})())
app.documents.add((function(){
var w = 100 + Math.random() * 100;
var h = 100 + Math.random() * 100;
return {
documentPreferences:{
pageHeight:h,
pagewidth:w
}
};
})());