jPaq News

Cloning Arrays March 12th, 2011 @ 7:02:27

The other day, I saw that someone posted a question about doing a deep copy in JavaScript.  Naturally, I thought I this would be very easy to do with the map function.  Just before I was about to say that the map function can be used with a one-line callback function, I noticed that someone else came up with a solution, but realized that it wouldn't work for a recursive array.  Therefore, I created a new version of Array.prototype.clone that will do a deep copy of the array if true is passed to it.  The benefit of this function is the fact that it does it can handle recursive arrays.  Unfortunately, I don't plan on just making a minor release with this addition and I haven't tested my other new features of jPaq enough to say that they are ready for the public.  Therefore, I have placed this code in JS Bin with an example just in case you are in desperate need of it.  As is stated in the comments, I still need to determine whether or not using recursion will prove beneficial.

Squares On A Checker Board March 7th, 2011 @ 9:48:33

Have you ever thought about how many squares are on a checker board?  Most people immediately come up with the number 64, but what about the bigger squares such as the entire board itself?  People usual think about the small one-by-one squares, but how about the two-by-two's and three-by-three's and so on?  In order to visually show how many squares are on a checker board or another type of rectangular game board, I wrote an example page and placed it on JS Bin at  This example uses both jQuery and jPaq.  The following jPaq items were used:

More News:  12