//flat con profundidad
let array = [1,2,3, [1,2,3, [1,2,3]]]
//evolver una matris con una submatris aplanada
console.log(array.flat()) //primer nivel
console.log(array.flat(2)) //segundo nivel
//mapear al array
let array = [1,2,3,4,5]
console.log(array.flatMap(value => [value, value * 2]))
//quitar espacios en al inicio del texto
let hello = ' helo world'
console.log(hello)
console.log(hello.trimStart())
//qitar los espacios al final del texto
let hello = 'helo world '
console.log(hello)
console.log(hello.trimEnd())
//opcional catch building
try{
...
//} catch (error) {
} catch {
...
}
//clave de arreglos to objeto
let entries = [["name", "adrian"], ["age"],[26]]
console.log(Object.fromEntries(entries))
//objeto de tipo simbolo
let mySymbol = 'My Symbol'
let symbol = Symbol(mySymbol)
console.log(symbol.description)