Ad
  • Default User Avatar

    Man this getting hard.

  • Default User Avatar

    function testit(s){
    //return s;
    //return s.substr(0,1);
    switch(s.length) {
    case 0: return "";
    break;
    case 1: return s;
    break;
    default:
    let array = [];
    let charArray = [];
    for (let iterator = 0; iterator < s.length; iterator ++) {
    if(iterator % 2 == 0) {
    charArray = [];
    }
    charArray.push(s[iterator]);
    if(iterator % 2 == 0) {
    array.push(charArray);
    }
    }

      return getcharacter(array);
      break;
    

    }

    function getcharacter(Strings = [[]]) {
    let retorno = "";
    Strings.forEach(value => retorno += value[0]);
    return retorno;
    }
    /author: return ???;
    me: Let's see how this goes
    /
    }

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution