D
D
Dima Pautov2015-10-20 10:22:12
JavaScript
Dima Pautov, 2015-10-20 10:22:12

How can I decline different words in js depending on the counter?

Good morning everyone! I have a counter that counts the number of selected input[checkbox].
But the words are 2 brands, 5 brands, etc. But I have several elements where my counter is substituted.
It's not a problem to do it, you can create an array of words and insert the number you need depending on the range of the number.
But how to implement with different words?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Spiridonov, 2015-10-20
@bootd

But how to implement with different words?

Make different arrays.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question