Q: Passing variables within the functions : I want to pass mentioned variable (insTypeDB) to another function. Please see the image Passing variables within the functions : I want to pass mentioned variable (insTypeDB) to another function. Please see the image.
    //Getting Symbol details from DB API
    var insTypeDB;
    pm.sendRequest("http://192.168.14.116:8080/ords/unidata/symbol/symbol/" + dataArr[1], function (err, response) {

        var resBoday = response.json()
        insTypeDB = resBoday.items[0].instrument_type_id;
        //var intInsTypeDB = parseInt(insTypeDB);
        console.log("insTypeDB " + insTypeDB);
        //pm.expect(insTypeDB).is.to.equals(2);
    });

    //Verify Instrument Type with DB API
    pm.test("Row : " + i + " - " + dataArr[1] + " :  Verify symbol Instrument type with DB", function () {
        let insTypeRes = dataArr[2];
        let intInsType = parseInt(insTypeRes);
        console.log("insType " + intInsType);
        pm.expect(insTypeDB).is.to.equals(intInsType);
    });[enter image description here][1]

Passing Variables error

A: //Getting Symbol details from DB API
var insTypeDB;
pm.sendRequest("http://192.168.14.116:8080/ords/unidata/symbol/symbol/" + dataArr[1], function (err, response) {

    var resBoday = response.json()
    insTypeDB = resBoday.items[0].instrument_type_id;
    //var intInsTypeDB = parseInt(insTypeDB);
    console.log("insTypeDB " + insTypeDB);
    //pm.expect(insTypeDB).is.to.equals(2);

    //Verify Instrument Type with DB API
    pm.test("Row : " + i + " - " + dataArr[1] + " :  Verify symbol Instrument type with DB", function () {
    let insTypeRes = dataArr[2];
    let intInsType = parseInt(insTypeRes);
    console.log("insType " + intInsType);
    pm.expect(insTypeDB).is.to.equals(intInsType);
});[enter image description here][1]
});

add the test inside the sendRequest as it is a call back else use setTimeOut which will wait for the value to be populated
pm.sendRequest("http://192.168.14.116:8080/ords/unidata/symbol/symbol/" + dataArr[1], function (err, response) {

        var resBoday = response.json()
        insTypeDB = resBoday.items[0].instrument_type_id;
        //var intInsTypeDB = parseInt(insTypeDB);
        console.log("insTypeDB " + insTypeDB);
        pm.varaible.set("insTypeDB",insTypeDB);
    });

setTimeout(()=>{

   pm.test("Row : " + i + " - " + dataArr[1] + " :  Verify symbol Instrument type with DB", function () {
        let insTypeRes = dataArr[2];
        let intInsType = parseInt(insTypeRes);
        console.log("insType " + intInsType);
        pm.expect(pm.varaible.get("insTypeDB")).is.to.equals(intInsType);
    })
    },5000)

