So I was working on a discord.js server info command. So I had an idea, of showing the emojis that are in a server, though I don’t know how to do that. I do know how to get the amount of emojis, but I’m not sure how to get the emojis. Answer
Tag: javascript
when zoom in browser cause one div container expand, how to adjust other div container length to keep the at a same bottom line?
HI I am now working on a webpage.In the page I have a left part and right part. The right part has a table view, and the left part just some buttons. it looks like this: It looks good now. but when I zoom in my browser to like 150%, 160%…, the right part(table) will expand its bottom vertically because
React Native Error (Invalid Element Type)
when starting my App on my iOS device I get this error: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but gor: undefined. You likely forgot to export your component from the file it’s defined in, or you might have mixed up defa…
How to update a value in multiples collections at once in firestore?
I’m building a forum appin Vue, basically a clone of this same site… The user can post questions, get answers to those questions and comments to those answers. I have a top level collection for questions, answers and comments respectively, and each document in those collections have a field called…
Javascript .on(‘click’ is not working on span
So I’ve spend already 2 days trying to solve this. I have a <span class=”faicon-add” data-id=”id_object_places_proximity_keys-0-place_icon” rel=”faicon-add”> and a jquery script loaded The problem is that $(‘.faicon-add’).on(‘click’, func…
Firebase not working on script but on main html it does (Javascript)
after pasting the given data of my database, doing retrieves correctly the data and its shown as i want, but making a function on a index.js gives me this error Uncaught ReferenceError: data is not defined at extend (index.js:59) at index.js:61 I dont get why it would work outside the function and not inside,…
Website crashing due to eventListeners; TypeError: Cannot read property ‘setAttribute’ of null
I’m trying to build and add a custom cursor on my website created using CSS/JS. Everything compiles fine and the webpage loads normally until you move the mouse… even 1 pixel. Upon moving the mouse, the webpage crashes, and I get the TypeError: Cannot read property ‘setAttribute’ of nu…
Write nested map function
I have an object like this: Expected output : And I already wrote a function like this: I can write another function to flatten the output of the code above, but is there any other way to write the code above into a more general function (not hardcoded) that can apply to any object? Answer You can use a recur…
JavaScript is displaying an incorrect mathematical answer
I wrote this small script that would calculate a students GPA. I decided to test it midway and it appears as if the code messes up. For example if I add 2 and 2 and 12 instead of displaying 2 it displays 1.75 which is weird. Answer You forget to add the third values so you get wrong results. If
Context API problem – object is undefined
I’ve been always using Redux, but I finally decided to try to play with Context API, but apparently I’m missing something. I get an error “TypeError: Object(…)(…) is undefined” in App.js, weather and details appear to be undefined. Could you please check out my code in orde…