A define function like the php one in js