INNER CODE UNIT · JavaScript

numberOfHealthyKidneys

irohandev/WebDev-DevOps-Cohort-3.0 · Week-04 NodeJs, Bun, Http Servers/Offline-Videos/01_Express/Array-Kidney-Game/index.js:35

            numberOfHealthyKidneys = numberOfHealthyKidneys + 1;           //aur isko count ko badha dega 
        }
    }
    const numberOfUnhealthyKidneys = numberOfKidneys - numberOfHealthyKidneys;          //isse unhealthy kidneys ko count kr rha ..total se good wle ko substract karke 
    res.json({                                       //aur phir yeh data output de rha jo ki iska respond hai
        numberOfKidneys,
        numberOfHealthyKidneys,
        numberOfUnhealthyKidneys
    })
})

app.post("/", function(req, res) {                  //ab kisko ko healthy ya unhealthy kidney add krna ho so post krega 
    
    const isHealthy = req.body.isHealthy;           //yeh input lene ka trika 
    users[0].kidneys.push({
        healthy: isHealthy                          //yeh input de rhe jo postman pe hm input krenge niche notes mein likha hai kaise krna hai
    })
    res.json({

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…