Changes

Jump to navigation Jump to search
m
no edit summary
Line 21: Line 21:     
     // Add some data
 
     // Add some data
     store.put({id: 12345, name: {first: "John", last: "Doe"}, age: 42, phone: '+33123456789'});
+
     var John = {id: 12345, name: {first: "John", last: "Doe"}, age: 42, phone: '+33123456789'};
     store.put({id: 67890, name: {first: "Bob", last: "Smith"}, age: 35});
+
     var Bob = {id: 67890, name: {first: "Bob", last: "Smith"}, age: 35}
 +
    store.put(John);
 +
    store.put(Bob);
 
      
 
      
   Line 28: Line 30:  
     var getJohn = store.get(12345);
 
     var getJohn = store.get(12345);
 
     var getBob = index.get(["Smith", "Bob"]);
 
     var getBob = index.get(["Smith", "Bob"]);
     store.put(getBob, phone: '+123');
+
     store.put(getBob, +{phone: '+123'});
    
     getJohn.onsuccess = function() {
 
     getJohn.onsuccess = function() {
530

edits

Navigation menu