Skip to content

Instantly share code, notes, and snippets.

View 19h47's full-sized avatar
🔥
This guy is on fire

Jérémy Levron 19h47

🔥
This guy is on fire
View GitHub Profile
@19h47
19h47 / largestNumberOfArrays.js
Created June 15, 2017 13:03
Create an array with largest number from sub array
function largestNumberOfArrays(array) {
return array.map( function (subArray){
return subArray.reduce( function (previous, current) {
return (current > previous) ? current : previous;
});
@19h47
19h47 / UppercasefirstLetterString.js
Last active June 15, 2017 11:40
Return first letter for each word in a given string
/**
* First letter in uppercase of each word of a given string
*/
function UppercasefirstLetterString(str) {
var arr = str.toLowerCase().split(' ');
return arr.map( function(letter) {
return letter[0].toUpperCase() + letter.slice(1);