{"size": 835, "ext": "js", "max_stars_repo_path": "js/scripts.js", "max_stars_repo_name": "Sunshinepunch/Friday-Week-3", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/scripts.js", "max_issues_repo_name": "Sunshinepunch/Friday-Week-3", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/scripts.js", "max_forks_repo_name": "Sunshinepunch/Friday-Week-3", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.09375, "max_line_length": 81, "alphanum_fraction": 0.5700598802}
//Business Logic

function roboRog(nombre) {
  let string = nombre.replace(/\D/gi, "NaN.");
  let arrayNum = [];
  if (string.includes("NaN") || string === " ") {
    return "Hey there! Something you entered is not a number. Try again friend.";
  }

  for (i = 0; i <= nombre; i++) {
    if (i.toString().includes(3)) {
      arrayNum.push(" Wont you be my neighbor? ");
    } else if (i.toString().includes(2)) {
      arrayNum.push(" Boop! ");
    } else if (i.toString().includes(1)) {
      arrayNum.push(" Beep!" );
    } else {
      arrayNum.push(i+",");
    }
  }
  return arrayNum;
}

//ui logic
$(document).ready(function () {
  $("form#num-form").submit(function (event) {
    event.preventDefault();
    const input = $("#num-input").val();
    const stringRog = roboRog(input);
    $("#display").html(stringRog);
  });
});