Skip to content

calculate compound profit in javascript

I have to calculate compound profit. for example, I have $100, increasing 10% monthly, and I have to calculate the total profit for 12 months. And I need a profit of every month in an array. I have tried this Answer There seems to be a bit of missing info here, but if “profit” means the amount gre…

POST net::ERR_NAME_NOT_RESOLVED

I’m trying to create a simple web application form. It requires the user to input their information, and click submit which ideally would hit an api and store the information somewhere like dynamodb. I have this code which is returning a response error POST net::ERR_NAME_NOT_RESOLVED For the life of me,…

Shuffle multiple arrays in the same way but with Lodash

I’ve got two arrays I need to shuffle both arrays so that they come out the same way, ex: There’s a few posts on stackoverflow that shuffle arrays in the way I described –this one is pretty great– but none of them demonstrate how to shuffle two arrays using Lodash. The JavaScript metho…

Hide or show input on dropdown selection

I am trying to create a sign-up page for my app. All the code works, but when I try to hide input box based on dropdown select, it doesn’t work. I tried this: But it didn’t work. And this is my code for the signup page: Answer It does work, you only need to place the script underneath the form

Using an empty string in path fails

In my node API i have some function that updates the email address Array of either a contact or a farm, its the same concept but the difference is where the array is located in farms is in Records.emails and in Contacts its in emails. So in my case I decide based on _type what the path is. In case

my three.js scene is not rendering. not sure why

my main.js file contains :- and my index.html :- All that appears on my screen is :- [what displays on my browser][1] [1]: https://i.stack.imgur.com/PQmJu.png I checked and my main.js file is definitely executing, but nothing is rendering on the screen Answer You have a few issues. This would select elements …