Extend the Permission enum so that it has the following fields:
- Read, which should have a value of 1
- Write, which should have a value of 2
- Execute, which should have a value of 4
Extend the getPermissionList function so that it accepts a combination of several Permission enums and returns an array of strings which are the names of the Permissions.
For example, executing:
getPermissionList(Permission.Read | Permission.Write);
should return [ 'Read', 'Write' ] in any order.
- Example case: Wrong answer
- The Permission enum has correct values: Wrong answer
- getPermissionList is called with a Permission: Wrong answer
- getPermissionList is called with a combination of Permissions: Wrong answer