Start by declaring the function properly. All you have above is some random lines of Javascript. If you want to pass a parameter to a function then your function definition must include a name for the parameter, using the function from your other question you could have something like:
function getPrice(discount) {
var price = Number(document.getElementById("p1").value);
var qty = Number(document.getElementById("q1").value);
var total = price * qty;
if (qty > 10) {
total = total * discount;
}
}