JavaScript Cookie Script: Incomplete code cleanup?
JonathansCornerCom
Status: New User - Welcome
Joined: 27 Jan 2009
Posts: 1
Reply Quote
At techpatterns.com/downloads/javascript_cookies.php , the Get_Cookie script includes:

:: Code ::
         return cookie_value;
         break;


Why is the break left in there after a return call?
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
good point. Just an oversight, and you are the first person to note it after how many 10k's of downloads of this script.

I would imagine it was put in there originally just as a double safeguard in case for some weird reason the return wasn't instant or whatever, who knows, heh.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours