I’m new to IBM cloud and I have been testing Toolchain to develop and deploy my code. I’ve been using Orion to edit my code online and git to commit, push it and deploy it. As you can see in the image everything seems to be running smoothly and with no problems. [![Toolchain general visual [1]: ht…
Tag: javascript
JavaScript shopping cart not functioning correctly
I tried coding a webpage with a functional shopping cart, where you can add items, and see the total money. There’s obviously something wrong with my JS, I just don’t know what it is since I’m new to JS. You’re supposed to be able to add items to the cart and see the total amount… I’m …
Error: Failed to create chart: can’t acquire context from the given item
So, i have downloaded a bootstrap template and i’m trying to change the data of the charts using js: So the html: JS: But i get in the console this error: Failed to create chart: can’t acquire context from the given item and no data show up in the chart. The original javascript code from the templ…
How to display data dynamically with ant design tables
first please my javascript skill level is not good, but here… I have a table i got from ant.design, im trying to build a frontend with react, so I want to display some data on the table from my database but im finding it had because of the want ant design table is set up. This is the code Note
Firebase Cloud Function listUser get 1000+ users
I want to modify the database value that has the uid of all users as the key after getting uid through listUser(), but listUser() has 1000 max. If there is a good way to get uid of all users, please let me know Answer The Firebase Admin SDK supports pagination to cycle through all the registered user accounts…
Mongoose – get documents with best score but only one of each user
So this is how my mongoose schema looks like: This is a quiz application so there are multiple documents with same userId. I am trying to make a query to build leaderboard and I came up with this. Now because I want to show only top 10 users, I have added .limit(10). Now in these 10 documents, there is chance
Change Text in Array in Javascript
I have the following list: What I want to do is write a forEach statement in Javascript to replace some certain words with my own hard coded work. For example, where Dev appears I want to change it to Development and where Financing<br/>and ESD I want to change it to Empowerment Financing I tried the re…
how to auth user using async and await in firebase
I have a simple app in Vue.js that authenticates existing users in firebase. So far it works but I want to make it using async and await instead of then? How can I rewrite my logic using async and await instead? I looked at the docs but didn’t find any information, here is my code: Answer define the pro…
Cant figure out why I cant retrieve data from my API
When I type a city name into my search bar it should pull up information on the weather on that city but I get a 400 bad request error JAVASCRIPT: Answer You are using a promise incorrectly. The correct syntax is .then(result => {}).catch(e => {}) Like this
Bootstrap Studio – The style property of my “ element is not changing during my JS function
I am using Bootstrap (in Bootstrap Studio) and plain JavaScript. I have colored the background of my <div> element by setting the CSS color to the default color. Now, I am trying to change that CSS color by setting a new value when a new tab is selected. The goal is to change the background color of tab…