How can I create argument defaults for a function?

I have this function (the purpose of the lines I included were to set defaults if the user forget to input something simply to prevent an error. I realize there is some lack of logic here):
addHSLink = function (hsElem, hsUrl, hsType, hsTitle, hsWidth, hsHeight) { //hsElem[string], hsUrl[string], hsType[string], hsTitle[string], hsWidth[string/number], hsHeight[string/number]
    var jQElem = $(hsElem);
    if (typeof hsUrl !== 'string') {
        hsUrl = '';
    if (typeof hsTitle !== 'string') {
        hsTitle = '';
    if ((typeof hsWidth !== 'string' && isNaN(parseFloat(hsWidth))) || hsWidth !== 'number') {
        hsWidth = 800;
    if ((typeof hsHeight !== 'string' && isNaN(parseFloat(hsHeight))) || hsHeight !== 'number') {
        hsHeight = 600;

    //Some other code
I would like to save some programming space and time by finding another way to set defaults

I saw somewhere that you could set a default in the arguments list
function someFunction(aVariable = false) {
//some code
but when I try to do this with all my arguments, I get the error:
"Missing ) after formal parameters"
Does that make sense