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