p
Size: a a a
p
F
DН
t
p
p
DE
DE
p
DE
ОП
KB
ОП
DE
DE
L
const isTrueStr = s => (s|| " ")
.replace(/[\r\n]/g, "")
.split("")
.sort()
.join("")
.match(/(.)\1*/g)
.every(v => /^(.)\1$/.test(v))
ОП
const isTrueStr = s => (s|| " ")
.replace(/[\r\n]/g, "")
.split("")
.sort()
.join("")
.match(/(.)\1*/g)
.every(v => /^(.)\1$/.test(v))
DE
function checkForDoubles (str) {
const skips = []
for (let i = 0; i < str.length; i += 1) {
if (skips.indexOf(str[i]) > -1) {
continue
}
const next = str.indexOf(str[i], i + 1)
skips.push(str[i])
if (next === -1 || str.indexOf(str[i], next + 1) !== -1) {
return false
}
}
return true
}
t
t