js snippet on function def