Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for [old] Bird Language by kurosawa4434
"use strict";
function translate(phrase){
return phrase.replace(/(.)\1\1/g,'$1').replace(/([^aeiouy ])[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!");
}
July 25, 2017