Javascript

How would you go about coding a custom cookie mechanism in JavaScript for storing and retrieving data?

Did you come across this question in an interview?

Interview question asked to Frontend Engineers interviewing at Riot Games, PopCap Games, SolarWinds and others: How would you go about coding a custom cookie mechanism in JavaScript for storing and retrieving data?.