function calculateAmount(p,r,t)
{
function calculateSimpleInterest()
{
return (p*r*t)/100;
}
return p+calculateSimpleInterest(p,r,t);
}
console.log(calculateAmount(1000,10,2));
hey folks the above code executed successfully, but a newbie like me it still create a a lot of confusion.