- js snippet - encapsulating