0

I have a Question with answer, But i want to know the reason.

There are two types to declare an object in javascript.

var test = {} // literal method

var test = new object();

Here the best best method I found in all the site is literal method. But I want to know the reason for why literal method in the best??

dee-see
  • 23,668
  • 5
  • 58
  • 91
Raja Sekar
  • 2,062
  • 16
  • 23

0 Answers0