Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 963 Bytes

README.md

File metadata and controls

12 lines (11 loc) · 963 Bytes

js_npm_sumInput

EN

Function asks the user to use the values using a hint and store them in an array.
Finishes entering values when the user enters a non-numeric value, an empty string, or clicks Cancel.
Counts and returns the number of elements in the array.
Zero 0 - it is considered, the value input does not stop when entering "0".

RU

Функция просит пользователя ввести значения, используя prompt и сохраняет их в массив.
Заканчивает запрашивать значения, когда пользователь введёт не числовое значение, пустую строку или нажмёт «Отмена».
Подсчитывает и возвращает сумму элементов массива.
Ноль 0 – считается числом, ввод значений при вводе «0» не останавливается.