question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

console statements not displaying result

See original GitHub issue

Challenge Profile Lookup has an issue. User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:


//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUpProfile(firstName, prop){
// Only change code below this line

console.log(" Hello World ") // <--- This statement is not logged in the console window 

// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");

there should be a way for a coder to check how control is flowing through my code. “console.log” statement is one such statement.

But console.log statement is not showing any output

Edit (@raisedadead): Original code hidden here

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sanyamccommented, Jul 23, 2017

I am assuming you want to see console.log out put on the webpage itself. Not sure why would we want to override a native browser api and show it on the webpage. Instead we can clearly see the console.log statements in browser’s dev tools. I have tried that in atleast 4 challenges and it works for various test cases. Using developer tools is an integral part of web development and we should use that instead of hacking console.log to display on the web page.

Above all i see following comment on the very first challenge which says that console.log is going to be in the dev tools. image

I suggest close it as by design.

1reaction
rnallucommented, Jun 11, 2017

Content Hidden - by mod

Hope this will helps in clsoing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Console.log not working at all - Stack Overflow
Sounds like you've either hidden JavaScript logs or specified that you only want to see Errors or Warnings. Open ...
Read more >
console.log() not working in my browser. - Codecademy
I wrote an HTML program with a Javascript code, with `console.log()` functions ... but the console.log() outputs the result in the “console” of...
Read more >
Console not displaying return values · Issue #17356 - GitHub
The output box below the code editor currently only displays test results, not console statements or returned values #17348.
Read more >
Console.log not working? - JavaScript
I have a few different console.logs and nothing shows up. I've even tried marking out ALL the code except for one line of...
Read more >
754861 - console.log doesn't show objects at the time of ...
When logging an object and then expending it, the object is expanded using the current values and not using a snapshot at the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found