title: javascript color function with mysql table values error
body: <p>I have a website about Christmas lights. I am using python flask for the sql database and query. 
  My sql tables columns look like this for user 1 (this is just an example)</p>
  
  <pre><code>column name: id text   blue   green  yellow   red   orange   pink
  
  value:        1  text    on     NULL    on      on    NUll    NULL
  </code></pre>
  
  <p>I need to get just the color data using flask which would probably be a sql statement.</p>
  
  <p>More importantly, I need a JavaScript function to check the column values and if they have on in the color, print a statement. 
  So far, I have</p>
  
  <pre><code>function colorCh(el){
      var list;
          for (var color in list){
              if (list[color] == 'on')
                  print("Good")
          }
      }
  </code></pre>