Pregunta de entrevista de Cybernet (Azerbaijan)

Js methods, remove duplicate words, react js