126 questions from the last 7 days
Advice
1
vote
8
replies
130
views
Making a palindrome out of a string of random letters (or any given value type inputs)
Found this code exercise on W3R. Been trying to figure out the relationship between the outer and inner loop (i and j), but can't seem to wrap my head around it. If anyone could walk me through this ...
Advice
2
votes
4
replies
66
views
Make native pinch-to-zoom trigger real layout reflow (without horizontal scroll) on mobile
I need the native pinch-to-zoom gesture in mobile browsers to behave like true browser zoom: when the user pinches, media queries should reevaluate and the layout should reflow. At the same time, the ...
-3
votes
3
answers
160
views
Why does the checkbox become unclickable when width is lowered?
This is a incomplete website design I have been working with. The problem is when I reduce the width of the browser the triple dash appears but for some reason the checkbox becomes unclickable. I ...
2
votes
2
answers
118
views
Light Mode Flash (in dark mode) On Reload Page
Always I reload any page happens a quick flash that changes the entire system to dark mode and comes back again, but really quick.
Before, this was happens also on dark mode too, but I could fix it ...
1
vote
3
answers
193
views
Why is my CSS outline appearing on input for both mouse click and keyboard focus despite using :focus-visible? [closed]
I have a simple HTML page with an input element:
input {
outline: none;
}
input:focus {
outline: none;
}
input:focus-visible {
outline: 1px solid black;
}
<input />
My goal is to remove ...
Advice
1
vote
2
replies
113
views
HTML static webpage - how would I have any of the files present in a particular directory be selected in a src
How would I go about, in an HTML webpage, having a random file in a specific directory be selected in a src? My intent is to have a randomized audio file autoplay whenever I open any webpage on my ...
0
votes
3
answers
104
views
What is the space complexity of this palindrome program? [closed]
In Scrimba's "Data Structures and Algorithms" course, in the lesson called "Challenge: Palindrome", the teacher analyzed the space complexity of the following program as O(n * k) (...
4
votes
3
answers
57
views
Can't get the ID of a SVG group
I have an SVG map with countries having both path and text elements. The elements are enclosed in a group with an ID, like this:
<g id="RW" ><title>Rwanda</title>
<...
3
votes
2
answers
72
views
Why isn't the class style applied and the button working inside the webcomponent
I am trying to understand how to make a web component with attributes. There is 2 problems I don't understand in the following code:
The div with the text 'the style of class is not applied' doesn't ...
-6
votes
0
answers
229
views
How to force Google Translate to translate text between <code.....> and </code> tags on my webpage? [closed]
How do I force Google Translate to translate text inside <code> tags on my webpage?
I read online that the <code tag can be replaced with a <span tag and then reverted after allowing ...
-4
votes
4
answers
113
views
Why is my JavaScript querySelectorAll not selecting elements by ID? [closed]
I’m trying to select multiple <p> elements in my HTML using querySelectorAll, but it’s not working.
Here’s my code:
<p id="ss">Paragraph 1</p>
<p id="ss">...
Best practices
0
votes
3
replies
73
views
Using setTimeout within useEffect() to debounce searching in react native pagination
I am planning to implement pagination into my project for my data from Supabase, I had the idea that since there are different parameters (such as search text, page number, filter) that I should use ...
-1
votes
1
answer
123
views
How to print a date in this specific format?
Given two arguments, a Date object and a string timezone, I want to print a JavaScript Date in this specific format:
5/13/2026 at 18:52 CST
How can I do it? The closest I got was this:
const myDate = ...
4
votes
1
answer
239
views
React Native Android: TypeError “Cannot read property 'getConfig' of null” after removing Reanimated (RN 0.75.2, Hermes)
I'm seeing this error in the Metro terminal immediately after my Android build finishes loading:
TypeError: Cannot read property 'getConfig' of null
js engine: hermes
There is no stack trace — this ...
Advice
1
vote
3
replies
71
views
Cannot read properties of undefined (reading 'goto')
I am super new in javascript and playwright. I encountered below error when trying to run my code.
Cannot read properties of undefined (reading 'goto')
This is my code.
exports.LoginPage= class ...