showing results for - "log javascript"
Roan
26 Oct 2019
1var str = "Howdy GeeksforGeeks"
2var geek = {
3  book: "harrypotter",
4  price: "2000"
5};
6var geek2 = [10, 20, 30];
7console.log(str);
8console.dir(str);
9console.dir(geek);
10console.log("geek (log) = ", geek);
11console.dir(geek2);
12console.log("geek2 (log) = ", geek2);
13
14// Prints only string as dir() takes 
15// only one parameter. 
16console.dir("geek2 (dir) = ", geek2);