Extremely Over-Nested

Published by er0s in

Create a function that returns the original value from a matrix with too many sub-arrays.

Examples

deNest([[[[[[[[[[[[3]]]]]]]]]]]]) ➞ 3

deNest([[[[[[[true]]]]]]]) ➞ true

deNest([[[[[[[[[[[[[[[[["edabit"]]]]]]]]]]]]]]]]]) ➞ "edabit"

Notes

You only need to retrieve one element.

Watch a quick demo on how Edabit works.