Flatten following array without using array.
flat
[1,2,[3,4], [5, [6, 7,[8,[9]]]]] into -> [1,2,3,4,5,6,7,8,9]
Find the number of valid set of brackets const braces = ')(()))('
let a = true
setTimeout(()=>{
a=false;
},2000)
while(a){
console.log(‘Hello”)
}
Hi Nagabrahmender
str = "this is a test string to identify the words that have e in them"
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
obj = {
key1: val1,
key2: val2
}
arr = [
{key1: val1},
{key2: val2}
]
/* multiply(4, 5); // => 20
multiply(3, 3); // => 9
const double = multiply(2);
double(5); // => 10
double(11); // => 22 */
---------
var firstWord = "Mary";
var secondWord = "Army";
isAnagram(firstWord, secondWord); // true
var k = 1; if (1) { eval(function foo() {}); k += typeof foo; }
https://codesandbox.io/s/priceless-torvalds-7h1nd4
----console.log(mul(2)(3)(4)); // output : 24
//using curry function
var x = 23;(function(){var x = 43;(function random(){x++;console.log(x);var x =
21;})();})();