I recently returned from an interview, and they basically asked: given the list of correct words and matching numbers with letters - something like 1 → ABC, 2-> DEF - how would I write a function that returns a list of valid strings. I tried my best and looked for guidance.
function validWords(digits, listOfValidWords) {
}
var dictionary = [
var words = validWords("1456", dictionary)
source
share