I’ve been looking for the javascript sleep function for a long time. Unfortunately, although most programming languages such as C/C++, php, python, etc. have a sleep function, javascript  has neither […]

I often got confused about JSON and JSON string. JSON is the code you write in your javascript script to represent an object, so the code is called JavaScript Object […]

I love php array because the array’s key can not only be number but also be string. $arr=array(“a”,”b”,”c”); $arr=[“a”,”b”,”c”]; $arr=array(“k1″=>”a”,”k2″=>”b”,”k3″=>”c”); $arr=[“k1″=>”a”,”k2″=>”b”,”k3″=>”c”];   That makes it an association array or a […]

The Date object looks simple. It has methods to get the date, month, year, hour,minute, second that it represents.  And it has methods to set these values. But it has […]