Profile
Achievement
segdeha's Recent Snippets
- All /
« Prev 1 Next »
This is a great way to save complex objects as cookie values. You can't just json_encode because commas are not legal in cookie values. Remember not to use this for anything too big because cookies have a 4KB limit.
1
715
posted 15 years ago by segdeha
Adds a method to the Array object that lets you slice the array down to everything before the given value.
0
524
posted 15 years ago by segdeha
Assign methods to a Function prototype when you intend to create instances of the type of object. Use object literals when you just need a container for functions.
0
940
posted 15 years ago by segdeha