0
Well, the problem is this, I have a function in which it requires a property permissions array type, inside the function, is a const perms = ['perm_1', 'perm_2', 'perm_3'].
Let’s say the user has set the function to be MeuTeste(['perm_1', 'perm_3').
How can I check whether the values of permissions exists within const perms?
Sample code
function MeuTeste(permissions) {
const perms = ['perm_1', 'perm_2', 'perm_3'];
}
Thanks in advance!