Skip to content

Instantly share code, notes, and snippets.

View HelaGone's full-sized avatar
💭
typing code

CubeInTheBox HelaGone

💭
typing code
View GitHub Profile
@TessMyers
TessMyers / gist:a252520dd9a8fe68f8e5
Last active October 5, 2023 16:36
Simple exercises using .map and .reduce
// Simple problems to solve using the native .reduce and .map array methods. Each of these problems can be solved in many
// different ways, but try to solve them using the requested higher order function.
// MAP
// Write a function capitalize that takes a string and uses .map to return the same string in all caps.
// ex. capitalize('whoop') // => 'WHOOP'
// ex. capitalize('oh hey gurl') // => "OH HEY GURL"
var capitalize = function(string){
// code code code!