https://www.codewars.com/kata/514a024011ea4fb54200004b
코드를 입력하세요
const domainName = function (arr) {
var hey = arr.split('.');
var numvv = 0;
console.log(hey)
var num = hey.forEach((element, index) => {
//console.log(index, element)
if (element.includes('www')) {
// console.log("?")
numvv = index + 1;
}
});
var ok = (hey[numvv]);
var ok_re = (ok.split('/'))
return (ok_re[ok_re.length - 1])
}