<commit_before>// take input string
// create empty output string
// remove last letter of input string
// add that letter to empty string
// keep doing this until the input string is empty
// return output string

function reverse(str) {
  var newString = ""
  for (var i = str.length; i > 0, i--)
    newString += str[i]
}<commit_msg>Add driver code to test function<commit_after>// take input string
// create empty output string
// get the last letter of the input string
// add that letter to empty string
// keep doing this until we've gone through the entire input string
// return output string


function reverse(str) {

  var newString = "";

  for (var i = str.length-1; i >= 0; i--) {
    newString += str[i]
  }
  
  console.log(newString);
  return newString
}


// driver code to test program

var test1 = reverse("Ellie");
var test2 = reverse("elephant");
var test3 = reverse("unencumbered");

console.log(test1) 

if (1==1) {
  console.log(test2)
}
{'fraction_non_alphanumeric': 0.11606217616580311, 'fraction_numerical': 0.010362694300518135, 'mean_word_length': 3.2933333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3163449', 'n_tokens_mistral': 298, 'n_tokens_neox': 288, 'n_words': 120}