define method in javascript object code example Example: objects in javascript let name = { name1: 'mark' }