Failed to pass the tests. Am I missing smthing?

Tell us what’s happening:
Hello, I do not understand why my api timestamp doesn’t pass even ONE test.
I am using firebase as host via functions
Can I send my url somone to test it manually? Thanks

Your code so far

app.get('/api/timestamp/:date_string',(req,res)=> {
    let value = req.params['date_string'];
    var date = new Date(isNaN(value)? value : parseInt(value));
    res.json({unix: date.valueOf(),utc: date.toUTCString()});
app.get('/api/timestamp/',(req,res)=> {

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36.

Challenge: undefined

Link to the challenge:

@afnman, I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor ( </> ) will also add backticks around text.

Note: Backticks are not single quotes.


1 Like