// *** before: ***var text = "2024-06-15";var withSlashes = text.replace(/-/g, "/"); // без /g заменился бы только первый// *** in version ES2021: ***const text = "2024-06-15";const withSlashes = text.replaceAll("-", "/");