r/javaScriptStudyGroup • • Jun 25 '22

Here’s a quick performance tip for your website

3 Upvotes

use preload and prefetch wherever required.

what is preload?

In simple terms, <link rel="preload"> tells the browser to download and cache a particular resource (script or a stylesheet) as soon as possible by giving that particular resource the highest priority while downloading all the resources for a page. So this means, while the browser starts to download all resources for a website, it will download the scripts or stylesheet having <link rel="preload"> first (highest priority), and then download the remaining resources (giving those resources high or low priority).

The browser doesn’t do anything with these resources after downloading it. The Scripts aren’t executed, stylesheets aren’t applied. It’s just cached, so that when they are actually required, it’s available for use immediately.

what is prefetch?

In simple terms, <link rel="prefetch"> tells the browser to download and cache a particular resource (script or a stylesheet) in the background. The downloading of these resources, happens with a low priority, so it doesn’t interfere with more important resources. Prefetch is helpful when you know you will need that resource on a subsequent page, and you want to cache it ahead of time. So that when you go to that next page, the resources for that page will already be available. Now make sure to use prefetch only when you are sure the user would navigate to a particular page from a given page.

The browser doesn’t do anything with these resources after downloading it. The Scripts aren’t executed, stylesheets aren’t applied. It’s just cached, so that when they are actually required, it’s available for use immediately.

checkout xplodivity for more javaScript content.


r/javaScriptStudyGroup • • Jun 12 '22

HELP!

3 Upvotes

Hi Everyone,

My goal is to get the first item which is "false" and the loop would stop after that.

It seems not to be working when i put break function for false, but when i change if to true it would work. Help please ;(


r/javaScriptStudyGroup • • Jun 09 '22

Filter function in Javascript from scratch | Polyfill

Thumbnail
youtu.be
3 Upvotes

r/javaScriptStudyGroup • • Jun 09 '22

I Recreated Wordle in Microsoft Word

Thumbnail
youtu.be
3 Upvotes

r/javaScriptStudyGroup • • May 28 '22

ShhFile File Share

3 Upvotes

Hi guys, could you checkout my js project? I want to know what practises should i avoid mostly in github commits https://github.com/majorek31/shhfile


r/javaScriptStudyGroup • • May 16 '22

The useActive hook | Custom React hook

3 Upvotes

I implemented a custom useActive hook to determine user activity in a given page. This hook will allow you to perform any action based on whether the user is active (moving, clicking the cursor etc) or not. here's a quick video explanation on how to implement it.
Link: https://www.youtube.com/watch?v=ibcCYL6Kf14


r/javaScriptStudyGroup • • May 10 '22

📣 Sparse vs Dense Arrays in JavaScript

3 Upvotes

Array in JavaScript is a very important concept. Developers are dealing with Arrays like creating, manipulating etc almost every day while implementing logic.
"An array is a special variable, which can hold more than one value".
But do you know that Arrays can hold nothing i.e. it is possible to create a hole in an Array?

In this blog post and youtube video, I will be discussing Sparse and Dense Arrays. Also, I will be talking about how to create them and what you can do with this type of array.

✅ Blog Link: https://sudipta-deb.in/2022/05/sparse-vs-dense-arrays-in-javascript.html
✅ Youtube Link: https://www.youtube.com/watch?v=CvxQSRvr22I


r/javaScriptStudyGroup • • Apr 23 '22

Random String Generator Node package

3 Upvotes

Hello Everyone,

Recently Me and my friend we were developing a node module that will generate random strings based on given parameters. The package has lots of features.

What you can do with the package:

  1. Password generation

  2. Token generation.

  3. Testing

  4. id generation

  5. Random Emoji Generation used for such as Avatar

  6. Random Unicode Emoji Generator

and More...

Published: https://www.npmjs.com/package/randomized-string

GitHub Repo: https://github.com/Dagic-zewdu/random-string

Also if you like the Project give us a Star on GitHub ✭

To Install

Install node modules

  • npm

npm install randomized-string 
  • yarn

yarn add randomized-string

Also, we have added Random Unicode Emoji Generator

Since it's an open source project, you can go to our GitHub repository, create an issue, and start Contributing.


r/javaScriptStudyGroup • • Apr 16 '22

Tic tac toe made easy | Vanilla JavaScript

3 Upvotes

I came up with an easy implementation of tic tac toe using pure vanilla javascript. I was told that in some frontend interviews, people were asked to implement tic tac toe within an hour and by using minimal css. I think this solution mentioned in the link below should be pretty easy to understand and implement.
Link: https://www.youtube.com/watch?v=O0tfoMN9Rjo


r/javaScriptStudyGroup • • Apr 11 '22

How to create a Star rating widget in pure vanilla JavaScript | Amazon SDE-II question

3 Upvotes

I created a star rating widget using 95% vanilla JavaScript and 5% CSS. This was asked in an amazon sde-2 frontend interview to implement purely using vanilla JavaScript. I tried to make the code extremely minimal and understandable. Learning how to implement these purely in vanilla js does add a lot of valuable learning to our JavaScript knowledge.Link: https://youtu.be/9GqhvxHNFag


r/javaScriptStudyGroup • • Mar 30 '22

3d popup card (image) using html and css only |

Thumbnail
youtu.be
3 Upvotes

r/javaScriptStudyGroup • • Mar 28 '22

Head To Head Comparison Between JavaScript and Node.js

Post image
3 Upvotes

r/javaScriptStudyGroup • • Mar 22 '22

can anyone tell me why the return show as an error in this image

Post image
3 Upvotes

r/javaScriptStudyGroup • • Feb 06 '22

What is the difference between statement and expression in JavaScript?

3 Upvotes

r/javaScriptStudyGroup • • Jan 26 '22

ChakraUI - Web Design like Flutter or SwiftUI

3 Upvotes

Hi React guys! With ChakraUI we can create beautifuls UI without the needed of CSS. Like we work in a declarative way, the UI's will be made very quickly. It's very similiar to work on SwiftUI or Flutter. If you are interested on ChakraUI you can see my video where I explain how it's works. YouTube Video


r/javaScriptStudyGroup • • Jan 21 '22

Cutting The Fat

3 Upvotes

Hey everyone, been lurking on here for a while now and have been working towards changing careers. Full disclosure, I have only been really putting the time in to learn since November, so I’m green as spring grass and please bear with me.

I opted for a Udemy course (Angela Yu, Full Stack Web Dev) and I’ve really been struggling with it because she recycles a lot of her stuff from other courses and some of the content is outdated by years. I really struggled with the JavaScript modules in the beginning, to the point where I’ve now basically dedicated my education time to getting better at it. That being said, I paid for the course and I want to finish it. I’m at the point now where we are going through databases (SQL/NOSQL etc) and I’m just really having a hard time seeing the relevance of it all if I wanted to focus primarily on be a “JavaScript developer”.

My question is, as a Junior, would you say that I need to have at least a basic understanding of say MongoDB, or do I need to know the ins and outs of it? Do I need to know how to build servers and use databases and be entry level “full stack” to get a job as a Junior? I’m not trying to reinvent the wheel here or cut corners, but I am trying to get my foot in the door by spring of this year.

Any and all help is appreciated. Thanks everyone.


r/javaScriptStudyGroup • • Jan 08 '22

NPM Hashlips Instalation Error Help!

Post image
3 Upvotes

r/javaScriptStudyGroup • • Jan 04 '22

HOW DO I CHECK IF AN ARRAY INCLUDES A VALUE IN JAVASCRIPT ARRAY?

3 Upvotes

This is the only way I know to do it in JavaScript array:

function contains(x, obj) {
   for (var i = 0; i < x.length; i++) {
       if (x[i] === obj) {
           return true;
       }
   }
   return false;
}

Is there a better and more short way to achieve this?

Visit for more question like this : Visit Here


r/javaScriptStudyGroup • • Nov 28 '21

Obsidian Dark Theme for VSCode

3 Upvotes

Elegant yet practical dark theme. Try it out and tell me what you guys think.

VSCODE: https://marketplace.visualstudio.com/items?itemName=Hamza-Aziane.obsidian-dark

VSCODIUM: https://open-vsx.org/extension/Hamza-Aziane/obsidian-dark


r/javaScriptStudyGroup • • Oct 26 '21

9 Coding Guidelines you should follow in JavaScript | Better JavaScript

3 Upvotes

r/javaScriptStudyGroup • • Jun 25 '21

TikTok Loading Page Using HTML-CSS

Thumbnail
youtu.be
3 Upvotes

r/javaScriptStudyGroup • • Jun 07 '21

Basic overview of props in React.js

Thumbnail
sampurna.hashnode.dev
3 Upvotes

r/javaScriptStudyGroup • • Jun 04 '21

I have no idea what I am doing. Help me please!

3 Upvotes

Happy National donut day! I am a beginner. I am trying to learn JS so I can have a better line of profession. I am doing an assignment on a basic escape room. It's all in JAVA using node so I don't have a css or html file. I need some help. Here are the parameters, situation, and rules. I'm thinking that I need to use a boolean when I am asking the player if they want to play and have them pick y/n.Write a game that lets a user escape a room. The character finds him/herself locked in a room. In order to escape the room, your character needs to find the key in the room and then open the door. There's also a hole in the wall in the room. If your character puts his hand in the hole, he dies.

Game start:

Tell the user their options:

  1. Put hand in hole

  2. Find the key, or

  3. Open the door

They can't open the door unless they find the key first.
They die if they put their hand in the hole.

If they pick Y, do I console.log the information about the situation and all the rules? How else would I include that information? I'm assuming that I would need to write an if else statement for the Y/N question.

I am also thinking that I will need to use a while loop for the game's 3 options. I don't know what syntax I need to write to do all of this. I would very much appreciate any help, or advice. You have no idea how grateful I would be. This is what I have so far, please don't laugh at me:

const readlineSync = require('readline-sync');

const userName = readlineSync.question('What is your name? ');
console.log('Hi ' + userName + '!');
const userName = readlineSync.question('Would you like to start the game?Y/N');
if(true){
console.log("Awesome! let's play! You find yourself in a locked room....")
} else {
console.log("Maybe some other time!")

Cheers!


r/javaScriptStudyGroup • • May 26 '21

Higher order functions? Closure?

3 Upvotes

Does anyone have any good resources for breaking down higher order functions and closure / functions that take in callbacks and return a totally different function? I'm not even sure if I'm using the correct terms, but I'm totally lost. I thought I had some understanding after doing fullstack's prep course, but I'm now going through codesmith's and I have hit a wall. I've done some googling and anytime I think I start to understand, I discover that I do not.

I'm also very confused by when you put parameters into the return and callbacks when in the function. Any help would be much appreciated!!


r/javaScriptStudyGroup • • Apr 29 '21

How to run a javascript code in the browser?

3 Upvotes

I have NodeJS installed and I embedded the JS source file in the HTML file bur still got nothing