r/javaScriptStudyGroup • • Jun 16 '24

Need help with automation

3 Upvotes

Hey Reddit fam, language learner here. I'm using AI (big thanks to Google Gemini!) to brainstorm IELTS speaking answers. Here's the grind: I craft titles for each question in Remnote (my fave note-taking app) to turn them into flashcards. But it takes FOREVER!

I had this idea: Automate the process! Basically, I want something that prompts the AI for answers based on a list I have in a Google Sheet (or something similar), then copies and pastes those answers into the corresponding Remnote titles.

you can have a look at my code here: Link

but last part is missing, and i need code to paste copied answers into remnote file under correponding titles. can anyone do that for me. you can find documentation to remnte in the file link that i provided


r/javaScriptStudyGroup • • Jun 05 '24

Tell me i m right or wrong

1 Upvotes

<!--   Radio Button Fetch And Display Input-->

<!-- <!DOCTYPE html> <html> <body> <input id="male" type="radio" value="Male" name="gender"> Male <input id="female" type="radio" value="Female" name="gender"> Female <button onclick="radio()">Click Me</button> <script> function radio() { // Using querySelector to find the checked radio button and get its value let selectedGender = document.querySelector('input\[name="gender"\]:checked').value; alert("You Selected " + selectedGender); } </script> </body> </html> -->

  1. Does in this code the  querySelector will check input like radio or text or date anything now are radio than code will see name and after checked will check the checked radio and display with the help of alert I m right


r/javaScriptStudyGroup • • Jun 04 '24

Introduction to Arrays in JavaScript

Thumbnail
thedevspace.io
6 Upvotes

r/javaScriptStudyGroup • • Jun 04 '24

Help needed in cursor position in JS

2 Upvotes

function getCursorPosition(canvas, event) {

const rect = canvas.getBoundingClientRect()

const x = event.clientX - rect.left

const y = event.clientY - rect.top

console.log("x: " + x + " y: " + y)

}

  1. Why do we have you subtract clientX by rect.left?

  2. Why cant we just console log clientX and clientY?

  3. Whats the difference between ClientX/Y and rect./top? Please help


r/javaScriptStudyGroup • • Jun 02 '24

Difference between prototype and __proto__

3 Upvotes

Hey so am new to JavaScript and these 2 concepts are really confusing me. Someone care to explain.


r/javaScriptStudyGroup • • May 30 '24

How to Manipulate Strings in JavaScript

Thumbnail
freecodecamp.org
4 Upvotes

r/javaScriptStudyGroup • • May 15 '24

Help understanding the differences in my code

2 Upvotes

Hello everybody! I spent 2 weeks stuck on a decrypt function (I'm a beginner). I managed to fix it with the help of chatgpt, but can you all help explain to me what made this new code work?

Here's my new code:

function decrypt(encryptedMessage, shiftValue) { let decryptedMessage = ""; let charCount = 0; for (let i = 0; i < encryptedMessage.length; i++) { let char = encryptedMessage[i];

    // Skip random letters added during encryption
    if ((charCount + 1) % 3 === 0) {
        charCount++;
        continue; // Skip this character
    }
    
    if (alphabet.includes(char.toLowerCase())) {
        let index = alphabet.indexOf(char.toLowerCase());
        let shiftedIndex = (index - shiftValue) % alphabet.length;
        if (shiftedIndex < 0) {
            shiftedIndex += alphabet.length;
        }
        decryptedMessage += alphabet[shiftedIndex];
    } else {
        // If not an alphabetic character, just append it to the decrypted message
        decryptedMessage += char;
    }
    charCount++; // Increment character count
}
return decryptedMessage;

}

Here's my old code:

function decrypt (encryptedMessage, shiftValue) { let decryptedMessage = ""; let charCount = 0; for (let i = 0; i < encryptedMessage.length; i++) { // Skip random letters added during encryption// if ((charCount + 1) % 3 === 0) { continue; //Skip this character }

    let char = encryptedMessage[i]
    if (alphabet.includes(char.toLowerCase())) {
        let index = alphabet.indexOf(char.toLowerCase());
        let shiftedIndex = (index - shiftValue) % alphabet.length;
        //Ensure shiftedIndex is positive//
        if (shiftedIndex < 0) {
            shiftedIndex += alphabet.length;
        }
        decryptedMessage += alphabet[shiftedIndex];
        //Skip if not an alphabetic character//
    } 
    else {
         
    }
    charCount++; //Increment character count
}

// Your decryption code here return decryptedMessage; }

The project was a Caesar's cipher. My original code didn't handle the decryption like it should've, and the problem was that the "random letter after every two characters" wasn't executed the same from my encrypt and decrypt. My encrypt was correct, my decrypt wasn't.

What about this new code allowed my decryption to work? Thank you all in advance


r/javaScriptStudyGroup • • May 13 '24

Day 6 of Revisiting Coding Spoiler

Post image
4 Upvotes

Yesterday was going throught CRUD and had some holiday distractions so didn’t do much there.

Today was more productive. Started with styling. The concept seems fun. Just grinding there.

React and its Applications are vast and seems pretty scary as the new no code tools are advancing exponentially.

At the same time , seeing the massive crowd of qualified developers and people with work experience is and anothet big nightmare.

competition #jobs #jobmarket #employment #javascriptdeveloper #reactjs #engineer #dkrevisitscoding


r/javaScriptStudyGroup • • May 09 '24

export a bool function

1 Upvotes

so im trying to export a value of sended here in my program wich changes from false to true only when i press send but it always give me the original value wich is false and doesn t get updated. I realised that it gets updated inside my Identity function but in the export it only exports the original value. It s an easy problem but not for me who started learning js and react.

here s the code

const sended = false;

const Identity = () => {
const[sended,setSended] useState(false);


 const handleSubmit = (e) => {
    const { addressTo, amount, keyword, message } = formData;
    e.preventDefault();
    if (!addressTo || !amount || !keyword || !message) return;
    const amountValue = parseFloat(amount);
    if (amountValue < 0.0005) {
      alert("Amount should be greater than or equal to 0.0005 ETH");
      return;
    }
    sendTransaction();
    setSended=true; 

  }
return (      
       <div>
          <button
            type="button"
            onClick={handleSubmit}
            className="text-white cursor-pointer"
          >
            Send now
          </button>
        </div>

    }

export { Identity as default,sended }

r/javaScriptStudyGroup • • May 04 '24

Seeking Guidance for My JavaScript Learning Journey!

1 Upvotes

Hey everyone,

I've started creating JavaScript tutorials on YouTube and I'm excited to dive deeper into this fascinating language. JavaScript, originally known as Mocha, has come a long way since its inception in 1995 by Brendan Eich at Netscape Communications Corporation.

Currently, I'm covering fundamentals like keywords, variables, and the nuances between let and var. But I'm here to ask for your help! Do you have any tips, resources, or suggestions to enhance my learning journey?

Looking forward to your insights!

https://youtu.be/OOM7WZE9dXE


r/javaScriptStudyGroup • • Apr 29 '24

Skill Trade / Coaching Swap anyone? Frontend/Vue (You) x SEO(me)

Thumbnail self.dvnschmchr
0 Upvotes

r/javaScriptStudyGroup • • Apr 24 '24

🚀 Top 7 CSS & JavaScript Projects for Coders & Web Developers!

Thumbnail
youtu.be
1 Upvotes

r/javaScriptStudyGroup • • Apr 24 '24

I'm so confused

Thumbnail
gallery
2 Upvotes

I'm a beginner in javascript, and this is my code. When I try to decrypt the secret message, I get spammed with these "undefined" !!! My mentor told me it could have something to do with negative numbers. Can somebody please help me? I just want this code to decrypt the message. I'm attending the Springboard bootcamp, so they're forcing me to learn Javascript in a span of about 3 weeks lol


r/javaScriptStudyGroup • • Apr 11 '24

Confused asf

Thumbnail
gallery
1 Upvotes

Got 2 ways to solve a problem,which one is ethical as both of em provide same output.


r/javaScriptStudyGroup • • Apr 09 '24

🎨 Form Input Wave Animation | CSS & JavaScript🚀

Thumbnail
youtu.be
1 Upvotes

r/javaScriptStudyGroup • • Mar 29 '24

Help!!

1 Upvotes

Guys, I'm an intermediate in c++ and am finding Js easy and fun, I'm doing development and need to know how much of Js I need to learn(topics) and possibly some resources and practice projects as well.


r/javaScriptStudyGroup • • Mar 27 '24

Mastering Animated Navigation with JavaScript | Web Development Tutorial for Beginners

Thumbnail
youtu.be
2 Upvotes

r/javaScriptStudyGroup • • Mar 24 '24

Adding chat widgets without modifying WordPress theme files

1 Upvotes

Hello everyone,

We have created a tutorial video that will go through step-by-step on how to install a chat widget to your WordPress website in literally minutes. https://css-javascript-toolbox.com/how-to/how-to-add-install-livechat-to-your-wordpress-website-in-minutes/


r/javaScriptStudyGroup • • Mar 20 '24

🚀 Top 7 CSS & JavaScript Projects for Coders & Web Developers!

Thumbnail
youtu.be
2 Upvotes

r/javaScriptStudyGroup • • Mar 20 '24

😱Learn Everything you need to know about The JS MAP Object💯

Post image
1 Upvotes

r/javaScriptStudyGroup • • Mar 13 '24

🚀 Top 7 CSS & JavaScript Projects for Coders & Web Developers!

Thumbnail
youtu.be
2 Upvotes

r/javaScriptStudyGroup • • Mar 08 '24

JavaScript crash course

3 Upvotes

hey guys, in case someone is looking for a solid JS basics tutorial, I found this one. It was published a few weeks ago and is pretty good https://www.youtube.com/watch?v=FtaQSdrl7YA


r/javaScriptStudyGroup • • Mar 06 '24

Awesome Border Animation Effects using CSS

Thumbnail
youtu.be
2 Upvotes

r/javaScriptStudyGroup • • Mar 06 '24

Help regarding setTimeout functions

1 Upvotes

set Timeout (let sum = (a, b)=>{

console.log(a + b)

},3000,43,34)

why does this produce an error??

set Timeout(sum = (a, b)=>{

console.log(a + b)

},3000,43,34)
and why does this not?? why should we not use let before declaring the arrow function


r/javaScriptStudyGroup • • Feb 21 '24

🚀 Top 7 CSS & JavaScript Projects for Coders & Web Developers!

Thumbnail
youtu.be
1 Upvotes