Counter project

Hello guys,
this I’m trying to build a counter project by using javascript from freecodecamp articles.
I don’t know what is wrong with it.

it is only worked when i do copy paste.
when i tried to type the code this is not working.
please help me i’m new to js and this the article im trying .

1 Like

Can you share the project code, I am not sure how can we help only having a screenshot?

Please, share all the code.
But in one first look, I can guess the problem is you don’t have a counter.

let count = 0;

const value = document.querySelector('#value');

const btns = document.querySelectorAll('.btn');

btns.forEach( function(btn) {

    btn.addEventListener("click", function (e) {
    const styles = e.currentTarget.classList;
    if (styles.contains('decrease')){
    else if (styles.contains('increase')) {
    else {
        count = 0;
    value.textContent = count;


This works for me.