<commit_before> // JavaScript Olympics

// I paired [by myself, with:] on this challenge.

// This challenge took me [#] hours.


// Warm Up

  var harry = {
    name: "Harry",
    event: "Marathon"
  }
  var serena = {
    name: "Serena",
    event: "Tennis"
  }

var atheleteArray = [harry, serena]


function win(array) {
  for (var i = 0; i < array.length; i++) {
    var current = array[i];
    current["win"]= current.name + " won the " + current.event + "!" 
    console.log(current["win"]) 
  }
}

// win(atheleteArray)

// Bulk Up

function reverse_string(string)
  puts string.reverse
end

function reverseString(string) {
  var array = string.split("").reverse();
  return array.join("");
}

console.log(reverseString("I love Dev Bootcamp!"))

// Jumble your words



function evens(numArray) {
  var evenArray = numArray.filter(function(val) {
    return 0 == val % 2;
  });
  return evenArray
}
​
console.log(evens([9,4,0,2,5,3,222222]))

// 2,4,6,8




// "We built this city"

var Athlete = function(){
  this.name = "<NAME>";
  this.sport = "swimming";
  this.quote = "It's medicinal I swear!" 
}



var michaelPhelps = new Athlete("<NAME>", 29, "swimming", "It's medicinal I swear!")
console.log(michaelPhelps.constructor === Athlete)
console.log(michaelPhelps.name + " " + michaelPhelps.sport + " " + michaelPhelps.quote)


// Reflection

// What JavaScript knowledge did you solidify in this challenge?

// I solidified how to use logic in JS and utilize methods.


// What are constructor functions?

// They are similar to classes in Ruby and create objects similar to their template.


// How are constructors different from Ruby classes (in your research)?

// Functions can't be defined within constructor function, but methods can be defined within Ruby classes.


<commit_msg>Make change<commit_after> // JavaScript Olympics

// I paired with <NAME> on this challenge.

// This challenge took me [#] hours.


// Warm Up

  var harry = {
    name: "Harry",
    event: "Marathon"
  }
  var serena = {
    name: "Serena",
    event: "Tennis"
  }

var atheleteArray = [harry, serena]


function win(array) {
  for (var i = 0; i < array.length; i++) {
    var current = array[i];
    current["win"]= current.name + " won the " + current.event + "!" 
    console.log(current["win"]) 
  }
}

// win(atheleteArray)

// Bulk Up

function reverse_string(string)
  puts string.reverse
end

function reverseString(string) {
  var array = string.split("").reverse();
  return array.join("");
}

console.log(reverseString("I love Dev Bootcamp!"))

// Jumble your words



function evens(numArray) {
  var evenArray = numArray.filter(function(val) {
    return 0 == val % 2;
  });
  return evenArray
}
​
console.log(evens([9,4,0,2,5,3,222222]))

// 2,4,6,8




// "We built this city"

var Athlete = function(){
  this.name = "<NAME>";
  this.sport = "swimming";
  this.quote = "It's medicinal I swear!" 
}



var michaelPhelps = new Athlete("<NAME>", 29, "swimming", "It's medicinal I swear!")
console.log(michaelPhelps.constructor === Athlete)
console.log(michaelPhelps.name + " " + michaelPhelps.sport + " " + michaelPhelps.quote)


// Reflection

// What JavaScript knowledge did you solidify in this challenge?

// I solidified how to use logic in JS and utilize methods.


// What are constructor functions?

// They are similar to classes in Ruby and create objects similar to their template.


// How are constructors different from Ruby classes (in your research)?

// Functions can't be defined within constructor function, but methods can be defined within Ruby classes.



{'fraction_non_alphanumeric': 0.13741307371349096, 'fraction_numerical': 0.011682892906815021, 'mean_word_length': 3.43403205918619, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 8, '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': '5500011', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1156, 'n_words': 366}