Created
May 9, 2019 09:33
-
-
Save devCharles/79e16902132ed8005932c2d3c55981a7 to your computer and use it in GitHub Desktop.
Crear una función que transforme todas las llaves de un objeto en llaves escritas en lowerCamelCase (solo las llaves)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cliente = { | |
Nombre: 'Jorge Rodriguez', | |
Edad: 35, | |
DireccionOficina: 'Oaxaca 96 Roma Norte', | |
DireccionCasa: 'Salamanca 15', | |
HistorialDeLentesComprados: { | |
Notorious: { | |
Color: 'negro', | |
TipoDeMica: 'bluelight', | |
Graduacion: { | |
OjoDerecho: 3, | |
OjoIzquierdo: 2 | |
} | |
}, | |
Air: { | |
Color: 'plata', | |
TipoDeMica: 'Sencilla', | |
Graduacion: { | |
OjoDerecho: 3, | |
OjoIzquierdo: 2 | |
} | |
} | |
} | |
} | |
function lowerCamelCaseObject (object) { | |
// write logic here | |
} | |
lowerCamelCaseObject (cliente) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment