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
  • 22,825
  • 5
  • 58
  • 88
Raja Sekar
  • 1,984
  • 14
  • 23

0 Answers0