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 byte986
"use strict";
const VOWELS = "aeiouy"
function translate(phrase){
return phrase
.replace(/([^aeiouy ])\w/g,'$1')
.replace(/([aeiouy]){3}/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!");
}
Oct. 29, 2016
Comments: