js syntax madness