Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Clear&Readable solution in Clear category for [old] Bird Language by SaintDron
"use strict";
function translate(phrase) {
return phrase.replace(/([aeiouy])\1{2}/g, '$1')
.replace(/([^aeiouy ])./g, '$1');
}
var assert = require('assert');
if (!global.is_checking) {
assert.equal(translate("hieeelalaooo"), "hello", "Hi!");
assert.equal(translate("hoooowe yyyooouuu duoooiiine"), "how you doin", "Joey?");
assert.equal(translate("aaa bo cy da eee fe"), "a b c d e f", "Alphabet");
assert.equal(translate("sooooso aaaaaaaaa"), "sos aaa", "Mayday, mayday");
console.log("Coding complete? Click 'Check' to review your tests and earn cool rewards!");
}
March 12, 2018