JavaScript Timer Set Interval JS ClearInterval

$timer = setInterval(command, 5000);
clearInterval($timer);
Nasty Narwhal