Three errors in my project, PLEASE HELP!

This is the code for my project
#pragma strict

function Start () {

}

function Update () {
function OnTriggerEnter(){
	gameObject.light.enabled = false;
	
}
function OnTriggerExit(){
	gameObject.light.enabled = true;
	
}
}
these are the errors in my code

Assets/light.js(8,10): BCE0044: expecting (, found 'OnTriggerEnter'.

Assets/light.js(8,26): UCE0001: ';' expected. Insert a semicolon at the end.

Assets/light.js(9,34): BCE0044: expecting :, found '='.

You should write Functions outside Update. You are writing functions, OnTriggerEnter and OnTriggerExit inside the function update…

It should be like this,

function Start () 
{

}

function Update () 
{

}

function OnTriggerEnter(){
    gameObject.light.enabled = false;

}

function OnTriggerExit(){
    gameObject.light.enabled = true;
}