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

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 ) }