1// Correctly type checking objects in Javascript
2const Drinks = {
3 Name:'Lemonde',
4 ID: '#0000#✏#',
5 Sale :{
6 price:99,
7 Full:100
8 }
9
10}
11
12console.log(Object.prototype.toString.call(Drinks)); // Result = [object object]
13
14
15// Note you can also use this method to type check Arry too.
16
17