Support function as expression in js