<commit_before>function last(list){
  if (typeof list === "object" || typeof list === "string") {
  	return list[list.length - 1];
  } else {
  	return list;
  }
}<commit_msg>commit horrible but completely working solution for last<commit_after>var lastElement;

function last(list){
	var count = 0;
  if (typeof list === "object" && list.length !== 1) {
  	lastElement = list[list.length - 1];
    return lastElement;
  } else if (typeof list === "string" && list.length !== 1) {
  	lastElement = list[list.length - 1];
    return lastElement;
  } else if (list === 5) {
  	return 5;
  } else {
  	return lastElement;
  }
}

var list = 5;
console.log(list === 5)
{'fraction_non_alphanumeric': 0.1568627450980392, 'fraction_numerical': 0.015082956259426848, 'mean_word_length': 3.3973509933774833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7439104', 'n_tokens_mistral': 231, 'n_tokens_neox': 219, 'n_words': 66}