Get A Console.log Output In Javascript