Positive Boolset

Desctiption

Implement a function that takes an array, values in this array must be ordered. Array order example: ['C', true, 'R', false ,'O', true, 'D', true, 'E', true, 'P', false] ODD values - 'key', EVEN values - 'value'. Function must return as a result array of 'keys' with positive 'values' after.

For example:

const array = ['C', true, 'R', false, 'O', true, 'D', true, 'E', true, 'P', false];
getPositiveKeysOfBoolset(array); // ['C', 'O', 'D', 'E']

Write your code in src/index.js

Run test locally npm test