如何在JavaScript中增加变量值

试图增加变量值但不起作用。如何增加值取决于传递的数字?

function getVal(val) {
  var checkProductId = val;
  var g = checkProductId.replace(/[^0-9]/g, "");
  var q = Number(g);
  var k = q++;
  console.log(k);
}

getVal("CSS10"); //out put should be in console.log(k);   11
getVal("CSS11"); //out put should be in console.log(k);   12