Skip to content
Permalink
b166a8cd5b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 16 lines (11 sloc) 250 Bytes
#!/usr/bin/env node
'use strict'
function print() {
console.log(this)
}
const obj1 = { name: 'Kent', print: print }
// this example uses the ES6 Object Shorthand syntax
const obj2 = { name: 'Cornwall', print }
print()
obj1.print()
obj2.print()