#First javascrpt challenge

23 messages · Page 1 of 1 (latest)

lusty summit
#

Hey guys i recently made this but i have been getting this error ever since i deployed the website, can anyone help me please ?

wet fern
#

This works for me

const home = document.getElementById('homescore');
const guest = document.getElementById('guestscore');
const incrementBtn = document.getElementById('increment');
const decrementBtn = document.getElementById('decrement');

let count = 0;
let count2 = 0;

function increment(value) {
    count += value;
    home.textContent = count;
    console.log
}

function increment2(value) {
    count2 += value;
    guest.textContent = count2;
    console.log(count2);
}

incrementBtn.addEventListener('click', increment);
#

If this does not work, Please share the scrim. I will take a look at it.

lofty gulch
#

Could be a deployment issue. In the browser dev tools, look at the Network tab, reload the page, and verify that all of the supporting files (.css, .js) are being loaded properly.

lusty summit
lofty gulch
lusty summit
lofty gulch
#

It looks like this could be a Netlify deployment of your GitHub repo of a downloaded Scrimba zip file. Try following these steps to repair the deployment: #general-chat message

Or, you could remove the package.json file from the GitHub repository, then deploy a new Netlify instance (specifically, delete the current instance and deploy a new instance).

lusty summit
lofty gulch
lusty summit
lofty gulch
#

I realized that the URL to the Netlify site was in the screenshot, so I visited it and viewed the Network tab myself. It looks like this is the same "Netlify deployment" issue that would be fixed by following the repair steps that I linked to.

#

Looking at the GitHub repo further confirms that it is likely the deployment issue.

#

It's been a problem forever, and Scrimba has never addressed it, so don't feel bad. There's no way you could have know that it wouldn't "just work" when deploying the site following their instructions.

lusty summit
lusty summit
wheat mural
#

Hey Voss, declared the same function name twice. You had two increment

lofty gulch
wheat mural
#

Yours was fine, Voss had the same function name twice. At least that's what I see in his screen shot. You had increment and increment2. But never mind. Not important.

lofty gulch