Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: fixCard Arguments: suit,number Description: Page type: webl Render function: Module: sandbox Page source: // var suits = ["Spades", "Hearts", "Clubs", "Diamonds"]; // var numbers = ["Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"]; Wub_DropDB("magicCardTrick"); // Get a reference to a named database. This command either creates a new one or accesses an existing one. var db = Wub_GetDB("magicCardTrick"); // Get a reference to a collection (like a table). var coll = Wub_GetCollection(db, "fixedCard"); // Create a DB Object (row) to insert into the collection. var dbobj = Wub_NewDBObject([. suit=ToInt(suit), number=ToInt(number) .]); Wub_InsertDB(coll, dbobj); [. suit=ToInt(suit), number = ToInt(number) .];