> For the complete documentation index, see [llms.txt](https://dexiejs.typogram.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dexiejs.typogram.co/dexie/dexie.tables.md).

# Dexie.tables

#### Syntax

```javascript
var db = new Dexie(dbName);
db.version(1).stores({table1: "...", table2: "..."});
db.open();

db.tables.forEach(function (table) {
    assert (table === db[table.name]);
});
```

#### Type

Array\<Table>

#### Sample

```javascript
var db = new Dexie("MyDB");
db.version(1).stores({friends: "++id,name,gender", pets: "++id,name,kind"});
db.open();

// Output the schema of each table:
db.tables.forEach(function (table) {
    console.log("Schema of " + table.name + ": " + JSON.stringify(table.schema));
});
```
