10 X

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

How many times does the below function run?

function fun(a,b){

if(a==b){

return a

return fun(a+2,b)

console.log(fun(5,15))
--------------------
const arr=[1,0,-2,2,true]

let sum=0

for(i=0;i<arr.length;i++){

if(arr[i]){

sum+=arr[i]

----------
let a=16

let n=0

for(let i=1; i<a; i*=2){

while(i%2==0){

i+=1

n+=1

value of i when n = 2

You might also like