Well , i have tried Split("?") and Split('?')
both give the same error ( link.split is not a function) , so i assume that there is a way to be able to split in jetpack but not using this Split ? maybe jQuery ? hope someone can help in this issue.
Got it , it is a href Split , so yeah as jordan said , it was not a string . so i used x.href.split("?") worked like a charm
Thanks