function test({start, finish})
{
start();
finish();
}
function run()
{
let obj = {start(){console.log("start");}, finish(){console.log('finish')}};
test(obj);
}
/*test will console.log 'start' and 'finish'*/
/*Note in the above example the names of functions MUST MATCH. test({x, y}) would NOT have worked.*/
/*not recommended unless you know the names of the input functions ahead of time*/