I am trying to add to a global variable in order to determine total file size from an ajaxfileupload. I've tried the two ways below but attachmentSize keeps returning NaN. I've tried an if statement that checks for isNaN false, but variable still set to NaN.
var attachmentSize;
function onUploadComplete(sender, args) {
attachmentSize += args.get_fileSize();
attachmentSize = attachmentSize + args.get_fileSize();
}