Questions tagged [javascript]
JavaScript is a versatile, high-level programming language. It is the programming language in all browsers, and can be used for back-end programming with Node.js. Use this tag for questions regarding vanilla JavaScript; optionally tagged with an ECMAScript version. If you are using a preprocessor such as TypeScript please tag with that too.
9,428 questions
3
votes
1
answer
170
views
GEE script annual Landsat 5/7/8/9 composites
Can you code review my Google Earth Engine script?
The goal is annual Landsat 5/7/8/9 composites (1990–2024) for the Angren ROI, NDVI/SAVI/LST + ERA5-Land. I doubt the correctness of the QA_PIXEL ...
9
votes
2
answers
659
views
Find winner of Connect-Four game board
The objective is to program the algorithm that, when given a connect-four board, it will tell you if there's a winner, a tie, or if the game is still on-going.
The public-facing API can be designed ...
5
votes
1
answer
167
views
Breakout Game as a Bookmarklet in JavaScript
Why I made it
I wanted to experiment with javascript: bookmarklets and see how far a small injected script could go on any site by making a simple injectable game.
...
1
vote
0
answers
268
views
Force Google Translate to translate text between <code....> and </code> tags on my webpage by replacing code with span and revert it after translation [closed]
Some browsers were not showing text on my webpage in bold so I put some text that was between <span> tags between ...
5
votes
1
answer
150
views
On the absence of protected member concept in javascript
I wanted to create a protected member in a javascript (ES) class but, of course, there is no such concept. So I devised a way that would let me create a member or something that "no one could ...
0
votes
0
answers
65
views
Streaming messages for Chrome MV3 Web extensions
Explainer
Problem
No standardized Web Extension API to send or transfer TypedArrays or ArrayBuffers or
...
0
votes
0
answers
55
views
WebSocketStream implementation, JavaScript runtime agnostic
References
WebSocketStream Explained
WebSocketStream API design
Source code
https://github.com/guest271314/websocket-stream-impl
Implementation
...
1
vote
1
answer
165
views
A different way to create HTML elements
I created this module to help with the creation of HTML elements:
...
3
votes
0
answers
101
views
Native Messaging performance test
I put together this Native Messaging performance test to determine based on evidence which programming language, JavaScript engine or runtime, and WebAssembly compiled code is fastest to round trip 1 ...
0
votes
0
answers
55
views
SpiderMonkey JavaScript engine Native Messaging host
Native Messaging host using Mozilla SpiderMonkey JavaScript/WebAssembly engine.
Documentations
Chrome Developers
MDN Web Docs
Microsoft Edge Developer documentation
Messaging between the app and ...
6
votes
5
answers
1k
views
JavaScript program that calculates the sum and difference of a pair of numbers
The goal of the following openprocessing.org JavaScript program is to calculate the sum and difference of a pair of numbers and print the 2 results if they are both positive. I want to do the ...
7
votes
1
answer
100
views
Fruity Balance GUI Remake
I am new to front end development and thought to recreate the GUI of Fruity Balance just for practice. I would love to hear any advice on best practices. I am also wondering if any improvements could ...
0
votes
0
answers
118
views
TCP and UDP sockets in the browser, Part 2: fetch() and WebRTC
A branch of a repository I maintain has a function that can do different things based on the input and expected result, and structure of a particular inner function call.
I can echo 20 MB to and from ...
-1
votes
2
answers
153
views
How would a more seasoned developer un-quag this quagmire?
I'm looking for suggestions on how this code structure can be improved. It feels like there's a smarter way.
The purpose of the script is to create live stream players if the following conditions are ...
3
votes
1
answer
162
views
Program to get all possible words from a set of letters
I wrote this code below to get all possible words for an array containing \$n\$ letters.
The logic of the code is that the letters of the array are mixed up in random positions and checks if this ...