[Vuejs]-How do I convert a dictionary from localStorage to an array of objects in Vue?

0👍

If you initialize with savedNews: Array, it is just function;
Because it is not instance of Array Object, it is constructor.

typeOf(Array)       // function  (It is constructor of Array)
typeOf(new Array()) // Object    (Instance of Array)
typeOf([])          // Object    (Instance of Array

Leave a comment