Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

331
Views
why am i getting error 404 on a client side function

//array of pictures var imageArr = ['/images/louis.jpg', '/images/louis1.jpg','/images/louis2.jpg', '/images/louis3.jpg']

var h3 = document.querySelector('h3')
 var image = document.querySelector('.img')

//event listener

 window.addEventListener('load', ()=>{

   setInterval(function(i){

     h3.classList.toggle('textcolorchange')

     for (var i = 0; i < imageArr.length; i++) {

        image.setAttribute('src', 'imageArr[i]')


     }
   },5000)






 })


client side js






const express = require('express');


const app = express();

const server = 3000;

app.use(express.static('public'))

app.get('/' ,(req, res)=>{
  res.sendFile( __dirname +'/index.html')
  })



app.get('/discography' , (req,res)=>{
   res.sendFile(__dirname + '/albums.html')
   })

app.get('/bio', (req,res)=>{
  res.sendFile(__dirname + '/bio.html')
   })

app.listen(server, ()=>{
  console.log('app is ;istening on port 3000');
   })

serverside js

my client side request is going back to my server and its returning an error 404 meanwhile i have the array in my clientside js

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!