// your code goes here
/*
Input:
Given an array as input which has some elements along with nested arrays.
Flatten the given array completely including the nested elements into a single array.
Eg: const arr = ["text", 100, 20, false, [[1, 2, [5, [9, 10]]], [[11, 12, [13, 14, 15, 16, [17, 18]]]]
Output:
["text", 100, 20, false, 1, 2, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
Output for the above example
*/
Ly8geW91ciBjb2RlIGdvZXMgaGVyZQoKLyoKSW5wdXQ6CgpHaXZlbiBhbiBhcnJheSBhcyBpbnB1dCB3aGljaCBoYXMgc29tZSBlbGVtZW50cyBhbG9uZyB3aXRoIG5lc3RlZCBhcnJheXMuCgpGbGF0dGVuIHRoZSBnaXZlbiBhcnJheSBjb21wbGV0ZWx5IGluY2x1ZGluZyB0aGUgbmVzdGVkIGVsZW1lbnRzIGludG8gYSBzaW5nbGUgYXJyYXkuCgpFZzogY29uc3QgYXJyID0gWyJ0ZXh0IiwgMTAwLCAyMCwgZmFsc2UsIFtbMSwgMiwgWzUsIFs5LCAxMF1dXSwgW1sxMSwgMTIsIFsxMywgMTQsIDE1LCAxNiwgWzE3LCAxOF1dXV0KCk91dHB1dDoKCVsidGV4dCIsIDEwMCwgMjAsIGZhbHNlLCAxLCAyLCA1LCA5LCAxMCwgMTEsIDEyLCAxMywgMTQsIDE1LCAxNiwgMTcsIDE4XQoKCk91dHB1dCBmb3IgdGhlIGFib3ZlIGV4YW1wbGUKCiov