initialize empty object js es6 in function code example Example: how to initialize empty javascript object let obj = {};