Jump Script not Working JavaScript

I am working on a double jump script for a game I am making but when I run the game my character does not jump at all, not once nor twice. I am not sure what the problem with the script is I was wondering if I could get some help.

My code is below:

var jumps: int = 2; // Max number of Jumps
var onGround : boolean = true;

function Update () {

//Reset Jumps when player hits the ground
if( onGround == true){ 
 jumps = 2; 

//Jump if you have any jumps left
if(( Input.GetButton("Jump")) && (jumps >=1)){
 jumps --;
 GetComponent.<Rigidbody>().velocity.y = 5; //Insert Your Jump Code Here


//Checking if player is on the ground

function OnCollisionEnter(collision: Collision) {
    onGround = true;

function OnCollisionExit(collision : Collision) {
    onGround = false;

Just use instead of and use CSS to style it to look like a link if you wish.

Buttons are made specifically for clicking, and they don’t need any href attributes.

The best way is to use onload action to create the button and append it where you need via javascript, so with javascript disabled, they will not show at all and do not confuse the user.

When you use href=“#” you get tons of different links pointing to the same location, which won’t work when the agent does not support JavaScript.

Reference by Yiioverflow