title: Object literals in javascript can only be defined within the window object?
body: <p>Can object literals be defined within any function declaration or only within the window object?</p>
  
  <pre><code>function declaration()
  {
      var objectLiteral = {
          property1: "test1",
          method1: function() {
              return "testMethod"
          }
      }
  }
  </code></pre>