added javascript else snippets