fork download
  1. const text = `Ukraine[a] is a country in Eastern Europe. It is the second-largest country in Europe after Russia,
  2. which borders it to the east and northeast.[b] Ukraine also borders Belarus to the north; Poland and Slovakia to the west;
  3. Hungary, Romania and Moldova[c] to the southwest; and the Black Sea and the Sea of Azov to the south and southeast.[d]
  4. Kyiv is the nation's capital and largest city, followed by Kharkiv, Odesa, and Dnipro.
  5. Ukraine's official language is Ukrainian.`;
  6. const punctuation = ".,;:!?()[]'\"-—";
  7. const punctuationSet = new Set(
  8. [...text].filter(ch => punctuation.includes(ch))
  9. );
  10. console.log("Множина розділових знаків у тексті:");
  11. console.log(punctuationSet);
Success #stdin #stdout 0.03s 17200KB
stdin
Standard input is empty
stdout
Множина розділових знаків у тексті:
[object Set]