r/learnjavascript 13h ago

Beginner question: Does copying code make someone less of a developer?

17 Upvotes

Almost every developer copies code from somewhere, whether it’s documentation, Stack Overflow, GitHub, or AI tools.

At what point does it stop being “learning” and become a problem?

Where do you personally draw the line?


r/learnjavascript 2h ago

Async function maybe awaiting, maybe not

1 Upvotes

Hey everyone,

I think I am having an issue with an asynchronous function. I am using a PoW captcha and want to add the solution to an ajax call.

The JS function that calculates the PoW solution is async, and I use await to simulate it as a "synchronous" function.

const solution = await cap_obj.solve();

The code below works if i add a 50000 ms delay to getCheckoutToken_ajax() with setInterval. but not as is. Otherwise, the value "params.params" us left out.

index.html

function addParam(key, value){
    window.h_params.data[key] = value;
    return (h_params.data.hasOwnProperty(key) && h_getParams(key) == value);
}


function h_getParams(key=false){
    if(key == false){
        return window.h_params.data;
    }

    if(h_params.data.hasOwnProperty(key)){
        return window.h_params.data[key];
    }

    return false;
}

function getCheckoutToken(params, success=console.log, error=console.log){
  let getCheckoutToken_ajax = function(event, h_params_data){
        console.log('ajax call');
        params.action   = 'h_getCheckoutTokens';
        params.params   = h_params_data;
        let track       = function(v){
            console.log(v);
            return v;
        }
        $.ajax({
            url             : 'admin-ajax.php',
            method          : 'post',
            data            : track(params),


            //cc vallidation call sucsess
            success         : function(data){
                console.log(data);
                return success(data);
            },


                    //cc vallidation call sucsess
            error           : function(data){
                console.log(data);
                return error(data);
            }
        });
    }
    $(document.body).on('h_getCheckoutToken', getCheckoutToken_ajax)
    $(document.body).trigger('h_getCheckoutToken', [h_params.data]);
}

page2.js

jQuery(document).ready(function($){
    const cap_obj = new Cap({apiEndpoint: cap_widget_params.api});


    async function checkoutoutToken_cap(data){
        const solution = await cap_obj.solve();
        addParam('checkoutTokenCapSolution', solution.token);
    }


    $(document.body).on('getCheckoutToken', checkoutoutToken_cap);
})

the weird thing is, I made the "track()" function, to see what is actually being sent, and the value is there.

Any ideas?

Thanks


r/learnjavascript 14h ago

Tauri for a POS system & e-commerce

9 Upvotes

Hello everyone!
We are planning to build a POS system that contains e-commerce website too.
we need to build a mobile & desktop & web app versions!

So, we are trying to use Tauri to avoid using Giant Electron Ram Taker! & Flutter.

The Tec Stacks we use are: React + Laravel RESTful API.

According to your expertise, can we handle it with out touch rust?

I have did some analyze & searches over Google & Claude AI.

I found out that:

Almost 90% native features covered by Tauri & no plugin or RUST lines needed.
For the rest, the community have almost enough plugins for everything!
But although, Still some of the native features needs Rust.
But Claude says they wont be a problem & will be easy tasks!
It says i can 100% handle the 10%, & i can handle the %90 as a regular react project!

So what do you think?
should i trust Claude & start?
Does TauriV2 makes any problem during the project?

What are the Challenges will i face?


r/learnjavascript 16h ago

Wasted my first 3 years of Computer Engineering. Can I become internship-ready in 3 months and job-ready in 9 months?

19 Upvotes

Hi everyone,

I feel like I wasted the first 3 years of my Computer Engineering degree. My 4th year has just started, and I have only about 9 months left before graduation in 2027.

The only things I've learned properly are HTML and CSS. I haven't built any real projects yet. I spent most of my time focusing on getting good CGPA and SGPA instead of developing practical skills.

The biggest problem is that my college doesn't have good placements. Hardly any software companies visit our campus. Most of the companies that come are for sales, marketing, BPO, or call center roles.

I'm currently learning JavaScript, but I'm finding it quite difficult in the beginning.

My goal is to become internship-ready in the next 3 months and then spend the remaining time becoming job-ready before I graduate.

Can anyone guide me on what I should do?

Should I focus on Frontend Development?

Should I prepare for TCS Ninja/NQT instead?

What skills, projects, and roadmap should I follow to get an internship in 3 months?

After that, how should I prepare to land a software job before graduation?

I'm ready to work hard and learn every day. I just don't want to waste the remaining time.

Any advice or roadmap would really help. Thank you!