---
# System prepended metadata

title: Subhradip Nath

---

# Subhradip Nath

# Question 1: JS Problem
```javascript=
arr - [1, 2, 3, 2, 3, 1, 2, 4, 2, 3, 1, 2, 3]

function -> arr -> 
{ 
    1: 3,
    2: 5,
    3: 4,
    4: 1
}



```
let arr=[1, 2, 3, 2, 3, 1, 2, 4, 2, 3, 1, 2, 3];


function countFreq(arr){
    for(let i=0;i<arr.length;i++){
        
    }
}




# Question 2: Find the 2nd largest number in an array.
```javascript=


let arr=[4,3,2,6,1];

function findHighest(arr)
    let max=arr[0];
    let sHigh=0;
    for(let i=0;i<arr.length;i++){
        if(arr[i]>max){
            shigh=max;
            max=arr[i];
        }if(arr[i]>shigh && arr[i]<max){
             shigh=arr[i];    
        }
    }
    return shigh;
}
```

```javascript=
function parent(){
    const name="subhradip";
    return(
        <>
            <child name={name}/>
        </>
    )
}

export default function child({name:name}){
    return(
            <h1>{name}</h1>
    )
}



```


# Question 4: 
String

toUpper
toLower



toProperCase ("nubhradip nath") -> Subhradip Nath



let String= {
    toproperCase:(str)=>{
        const arr=str.split(" ");
        arr.map((i)=>{
            return i.toUpperCase(0,1);
        });
        return arr.toString(" ");
    }
}

