I have made a website where I have created “pages”. Each page is essentially a container with nested elements. I have coded a fading effect on my page where I set all non-visible pages to 0 opacity and the visible opacity of the displayed container to 1. I have a working algorithm that can switch …
Category: Questions
Diferent ways to rearrange data from one array into another
From API, I get array of attendances by date with members data. My task is to convert that data to array of objects with clients data end attend_date. I managed to accomplish that in following snippet….
Why is there an error with onclick function?
I’m working on an assignment that asks us to use Promise, and when I run the script, I am getting this error on line 37: Uncaught TypeError: Cannot set property ‘onclick’ of null I can’t understand why the onclick is throwing this error, because I have used buttons before with similar …
How to type text in Russian from clipboard using applescript without changing the system language on the Mac?
I automate the filling of forms in Latin alphabet, but in one place there is a field where i need to type the text in Russian. Before filling in, I copy the desired word in Russian and I want to type it from the clipboard without changing system language / encoding / charset. In other words. Just type a word
Using Promise in a for loop, all the .then came later is always be called untill all the first .then is finished running, why is that?
I am new to JavaScript and with the concept of Promise. And I am doing test. I created a promise and two for loop that runs Promise for 6 times in total, and I knows when they got executed by console.log() Here’s my code and here’s how the console be like: Why is the second .then and all the .fina…
CSS: make a property ignore the transition time without using jQuery
I recently got into this problem, I have a ‘div’ element that is set to have: #add-wallet-div { width: 10px; height: 10px; background: blue; border-radius: 10px; opacity: 0; …
TypeError: arr1.flat is not a function JavaScript
What’s wrong here? It’s saying array.flat is not a function. Answer Array.prototype.flat() is a relatively new feature, some environments such as Internet Explorer and Node.js < 11 will not support it. You can use a polyfill such as core.js or even setup a transpiler, such as babel, the differe…
How do I print just the first and second element of an array?
I have an array called tagline that looks like this: [” Leger Poll”, ” Web survey of 2″, “test”, “test”, “test”, “test”] it is pulled from …
Canvas Image not showing
I am currently having issues with displaying images in the HTML canvas. I am still new and I am quite tired so its likely theres somthing stupid I did not do. Heres the code: const canvas = …
How does Instagram know which button you clicked without having an ID or Name of the button?
A very random question, I just looked at instagram and when you click that 3 dots on the feed on a following user post, you have multiple options: https://i.stack.imgur.com/oDUXA.png I looked like …