delete js funct