Q: Performing arithmetic operations in Postman? I am trying to get a response containing a sum of numerical values I sent using Postman. But instead, I'm getting the concatenated value.  Please help me.

And here is my code snippet: 
 const {
            amount,
            old_balance,
            account_number,
            transaction_type,
            cashier
        } = req.body;

        let x, y, sum; 

        x = amount
        y = old_balance; 
        sum = x + y; 

        const newDebit = {

            created_on: create_on,
            transaction_id: transactions.length + 1,
            account_number: parseInt(account_number),
            amount: parseFloat(amount),
            cashier: parseInt(cashier),
            transaction_type: transaction_type,
            old_balance: parseFloat(old_balance),
            new_balance: parseInt(sum)
        }


A: You should first convert string to int then add x & y. Change code to 
const {
    amount,
    old_balance,
    account_number,
    transaction_type,
    cashier
} = req.body;

let x, y, sum; 

x = amount
y = old_balance; 
sum = parseInt(x) + parseInt(y); 

const newDebit = {
    created_on: create_on,
    transaction_id: transactions.length + 1,
    account_number: parseInt(account_number),
    amount: parseFloat(amount),
    cashier: parseInt(cashier),
    transaction_type: transaction_type,
    old_balance: parseFloat(old_balance),
    new_balance: sum
}

