Skip to content

Instantly share code, notes, and snippets.

@jesugmz
Last active June 16, 2018 20:13
Show Gist options
  • Select an option

  • Save jesugmz/12d9b1c46c06339e3881291cbc3a9c3e to your computer and use it in GitHub Desktop.

Select an option

Save jesugmz/12d9b1c46c06339e3881291cbc3a9c3e to your computer and use it in GitHub Desktop.
Share constants (or globals) in JS
export const ANIMAL_TYPES = [
{
text: 'Perros',
value: 1,
},
{
text: 'Gatos',
value: 2,
},
];
// consider to group multiple constant files under `constants` folder
import { ANIMAL_TYPES } from './AnimalTypes.js';
console.log(ANIMAL_TYPES);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment