I'm early in learning solidity (that's probably obvious). No idea why I'm getting this result.
medsToBeDeveloped has a length of 0 at begining
uint [] medsToBeDeveloped;
function returnProductID() external returns(uint){
uint randNum = medsToBeDeveloped.length;
medsToBeDeveloped.push(randNum);
potentialMedsToManufacturer[randNum] = msg.sender;
return(randNum);
}
Javascript:
$("#requestID").on('click', function(){
announceButton("request ID");
contract.returnProductID(function(err, id){
console.log(typeof id);
console.log("id: " + parseInt(id) + " thatis all");
});
})
I'm probably doing something very obvious