in Vue.JS by
Q:

How to create Constants in Vue js.

1 Answer

0 votes
by

To create constant const keyword is used.In Vue.js we suggest to create a seperate file for defining your consants.
Example:

Creating a Constant in Vue js.

export const SITE_URL = 'https://www.madanswer.com';

Importing a Constant in Vue js.

import {SITE_URL} from './path/to/constants.js';

Related questions

0 votes
asked Jan 9, 2020 in Vue.JS by GeorgeBell
0 votes
asked Jan 9, 2020 in Vue.JS by GeorgeBell
...