After geting HIGH or LOW input from a vibration detector , how to glow a LED?

As descried in header, after receiving the input from vibration detector, how to glow a led to show high signal, i need a function for that???

var vibration = '';

function setVibration( val ) { ....vibration = val; }

function updateLed( sensorPin, ledPin ) { ....//get state for vibration sensor and store it ....digitalReadHandler( sensorPin, setVibration ); ....//vibration now holds either HIGH/LOW ....//accordingly update the led ....digitalWrite( ledPin, vibration ) }

You only need to call updateLed().