Skip to content

Instantly share code, notes, and snippets.

@Hebilicious
Hebilicious / demo.js
Created January 22, 2018 00:51
ES Class constructor spread operator arguments
//Let's create some arguments as functions
let message = () => "hello"
let content = () => "world"
let text = () => "lorem"
//Let's change the function internal name value...
Object.defineProperty(text, "name", {writable:true});
text.name = "book"
//Now we create a class