JSFiddle - React, Tailwind, and code Playground

JavaScript

var str='Привет МИр'
str=str.replace(' ','')
alert(str);