const tmp = {k1: 1, k2: 2} const test = () => { return {...tmp, ok: true} } alert(JSON.stringify(test()))