Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 666 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 666 Bytes
difficulty OAs projects
beginner
arrays
data-lovers

tenRun

https://the-winter.github.io/codingjs/exercise.html?name=tenRun&title=Array-2

Para cada múltiplo de 10 no array fornecido, altere todos os valores seguintes para ser esse múltiplo de 10, até encontrar outro múltiplo de 10. Portanto, [2, 10, 3, 4, 20, 5] resulta em [2, 10, 10, 10, 20, 20].

Exemplo

    tenRun([2, 10, 3, 4, 20, 5])  [2,10,10,10,20,20]
    tenRun([10, 1, 20, 2])  [10,10,20,20]
    tenRun([10, 1, 9, 20])  [10,10,10,20]

↩️ Voltar