DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
es6 method definition syntax
const obj = { foo() { return 'bar'; } }; console.log(obj.foo()); // expected output: "bar"
Source by developer.mozilla.org #
PREVIOUS
NEXT
Tagged:
#method
#definition
#syntax
ADD COMMENT
Topic
COMMENT
Name
5+9 =
Submit