Skip to content

Instantly share code, notes, and snippets.

@djD-REK
Created August 29, 2019 17:00
Show Gist options
  • Save djD-REK/b8622ad56b225afab558c651fa2e8f0b to your computer and use it in GitHub Desktop.
Save djD-REK/b8622ad56b225afab558c651fa2e8f0b to your computer and use it in GitHub Desktop.
function returnAnObject() {
return
{ test: 1 };
}
console.log(returnAnObject());
function returnAnotherObject() {
return { test: 1 };
}
console.log(returnAnotherObject());
const returnAnObjectArrow = () => {
test: 1;
};
console.log(returnAnObjectArrow());
const returnAnotherObjectArrow = () => {
return { test: 1 };
};
console.log(returnAnotherObjectArrow());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment