c# to JavaScript how?

i would love it if someone code put this code into js would love them forever haha, but i would really appreciate it!

using UnityEngine;
using System.Collections;


public class MenuObject: MonoBehaviour 
{
        will quit the application
        public bool isQuit = false;
 
        
        void OnMouseEnter()
        {
                renderer.material.color = Color.red;
        }
 
       
        void OnMouseExit()
        {
                renderer.material.color = Color.white;
        }



       
        void OnMouseDown()
        {
                if(isQuit)
                {
                        Application.Quit();
                }
                else
                {
                        Application.LoadLevel(1);
                }
        }
}

This is so easy it’s untrue, which kind’a makes me suggest you’re just being lazy?? (I dunnooo?)

All you have to do is literally replace Void, with Function, and:

 public bool isQuit = false;

To:

var isQuit : boolean = false;

You also want to remove the:

public class MenuObject: MonoBehaviour 
{

As well as the closing ‘}’

Oh and you can remove the ‘using’ bit at the top

thank you oliver unlike dave you actually helped! as i said in the beginning i dont know what i’m doing! so thanks for pointing that out dave i thought it was obvious.

does this look right

#pragma strict

private var isQuit : boolean = false;	

	function OnMouseEnter()
{
		renderer.material.color = Color.red;
}

	
	function OnMouseExit()
{
		renderer.material.color = Color.white;
}



	function OnMouseDown()
{

if(isQuit)
{
		Application.Quit();
}


else				

{
		Application.LoadLevel(1);
}
}