Skip to content

Instantly share code, notes, and snippets.

@kerren
Created March 22, 2021 19:26
Show Gist options
  • Save kerren/925416614a1f9566f05912d23fb86eed to your computer and use it in GitHub Desktop.
Save kerren/925416614a1f9566f05912d23fb86eed to your computer and use it in GitHub Desktop.
[Object key names] Name your variables right! #object #names #typescript
const name = 'John';
const surname = 'Doe';
const someOtherVariableThatIsNotNamedCorrectly = 22;
const person = { name, surname };
const personWithAge = {
name,
surname,
age: someOtherVariableThatIsNotNamedCorrectly
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment