javascript: simple dead code elimination