Skip to content

Tag: javascript

Uncaught Error: Info(…): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 7 m…

How can I remove a number of objects in an array?

I have an array like this : I only want two of each of category object in the array and remove the rest If the number of objects of that category is over 2 and get something like this : How can I remove the rest of the objects of a specific category If the number of those objects in

Discord Embed Command Cooldown

im trying to create a cooldown for my status command, because they spam a lot on the server the status command and i want a cooldown like 5m and that send a message like, “you need to wait 5m more to use this command im really newbie to javascript, so if anyone can help me Here its my entire command:

Why exercism.org doesn’t accept my solution JS?

I just started with exercism and doing Javascript exercise 2, Lucian’s Luscious Lasagna. I wrote all the code on my VSCode and it all worked fine. but when I insert it in the editor on exercise, it shows errors and doesn’t accept it. It is also showing some things I haven’t seen like ‘…

Get buffer from post body in Expressjs

I am making an express application that handles post data. Because the request body could be any content type and/or binary, I would like req.body to be a Buffer. So what should I use to get a Buffer that represents the request body? Here is my code: Answer body-parser can help achieve this, code example woul…