Questions tagged [javascript]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
How can I set the value of input to a variable for using outside of the function?
<input id="myInput" onchange="myFunction(value)" />
<script>
let result = "&...
I try to update my global state using Redux, but I try to update just one paramter of five, not all.
My store code looks like:
const initialState = {
loggedIn: false,
thisUser: {}
}
export ...
enter code here if the number of div from the first page is increased or decreased based on that increase or decrease the number of dynamic div
I'm having difficulty defining the type of setUser. I have created a custom hook for firebase authentication it is working fine on the custom hook page but when I import the user into another page the ...
In below code question1 value is coming as NaN i want to convert it to 0 but i am not able to do it using parseInt.Please help me if i can convert NaN value to 0
app.post('/auth/total',function(req,...
I am trying to connect and run Node.js server and connect to collection on MongoDB Atlas. Howewer, I am geting crash in line where I should get connection response. Please advise:
.env file:
...
So I want to get a category navigation which contains icons and labels.
I've tried with Chips:
{categories.map((category) => (
<Chip
...
I am trying to require a js file in my express api but I am getting a 502 error whenever I do. The file getJSON.js is in the same directory as my express js file but for some reason I am having ...
I'm using tailwind to try and make some features sit nicely together.
Currently having some issues with trying to get a calendar component to fit above other components in a dashboard,
<div ...
I'm struggling with an import an use esternal function in Vue js
I have a fonction that get an object from S3 bucket and i will for sure use it several times in all my project.
So my idea was to ...
Tha idea is iterate over a array and save (or update) values.
const [skills, setSkills] = useState([]);
useEffect(() => {
Object.entries(array).forEach(([k, v]) => {
console.log(&...
I've put several sliders on one page with a single design and config for all of them when clicked 'swiper-button-next' all sliders act to that! how can I make it work only on the intended slider, the ...
function show result in JavaScript is not working yet after review and revision for al codes in html, CSS and JavaScript but the message report (alert) is not work.
I want to know if there is a clean way to modify a value in a hashmap or create it if it doesn't exist without doing an if block. Example of what i'm currently doing
let dict = {}
if(dict['key']){
...
I have an issue, I don't understand how to "install" sodium-plus for using on my website.
I installed :
<script src="https://cdn.jsdelivr.net/npm/sodium-plus@0.9.0/index.min.js"&...