Skip to main content

All Questions

Tagged with
Best practices
1 vote
2 replies
59 views

In JavaScript, how costly is a function call? I ask because I'm looking at, at the start of a function, checking whether the results have already been calculated and, if so, just use them (assuming ...
Richard's user avatar
  • 5,123
Advice
0 votes
2 replies
75 views

I was thinking back to WinJS or WinUI with Windows Universal Applications (WUA) from about 10 years ago. I am wondering how it compiled and avoided typical architecture errors. If there is no memory ...
LJones's user avatar
  • 35
7 votes
1 answer
139 views

I compared the speed of normal JavaScript functions and prototype extensions. function NormalizeSpace(str) { return str.trim().replace(/\s+/g, " "); } String.prototype.NormalizeSpace = function () ...
Dr. Gut's user avatar
  • 3,335
-2 votes
1 answer
129 views

I’m experimenting with sorting large arrays of unique integers in JavaScript and came up with a simple approach. I’m curious if it’s a recognized pattern or if there are potential pitfalls I might be ...
Aaron's user avatar
  • 1
0 votes
1 answer
61 views

On mobile, when the transcript scrolls automatically to follow the currently playing dialogue, the view doesn’t stay fixed. Instead, it jumps: First it moves to the current dialogue, then it suddenly ...
reza's user avatar
  • 11
-4 votes
1 answer
110 views

I'm learning JavaScript and practicing merging arrays. Here's one of the methods I wrote using two for loops: const arr1 = [4, 5, 7, 9, 8]; const arr2 = [-1, -2, 0, 12]; const arr3 = []; for (let i = ...
user31029120's user avatar
1 vote
0 answers
56 views

I'm working on a ReactJS application where I have a table with an infinite number of rows (user can keep adding rows). Each row has 10 input fields (columns). There is one constant total row at the ...
Pratik Patil's user avatar
0 votes
0 answers
73 views

I'm trying to profile my heap implementation, so I've created this script: class BinaryHeap { array; comparator; constructor(comparator) { this.array = []; this.comparator ...
Eric B's user avatar
  • 373

15 30 50 per page
1
2 3 4 5
565