Ayuda juntando todo

ayuda no puedo avansar juntando todo

esta es la solucion
import

{

mapString

,

isSubsequence

,

longestWord

}

from

‘subsequence.functions’

;

import

{

dictionary

,

stringSequence

}

from

‘subsequence.words’

;

function

longestMatch

(

string

,

dictionary

,


)

{

let

sequences

=

[


]

;

let

map

=

mapString

(

string

,


)

;

for

(

var

element

of

dictionary

)

{

if

(

isSubsequence

(

element

,

map

,


)

)

{

sequences

.

push

(

element

)

;

}

}

return

longestWord

(

sequences

,


)

;

}

;

console

.

log

(

stringSequence

)

;

console

.

log

(

dictionary

)

;

console

.

log

(

longestMatch

(

stringSequence

,

dictionary

)

)

;

play_arrow Ejecutar código

refresh

Cor