Declaring multiple const

Why does this work:

const LOGIN = 'LOGIN', 
const LOGOUT = 'LOGOUT';

And this does not:





Why do you think this doesn’t work (hint, it does)? Can you give us more details about what issue you are having?

When I tried to do it the second way in a challenge it did not work. Maybe something was just wrong with the challenge…

The challenges sometimes use regex to read your code, and if it doesn’t match it will throw an error (even if the code still works).

What challenge were you working on?

Redux: Use const for Action Types

Yeah, it looks like that particular test looks for two separate const variable declarations. :slight_smile: