Clean JavaScript code