how to compare previous value with current in jquery

Solutions on MaxInterview for how to compare previous value with current in jquery by the best coders in the world