r/JavaScriptTips • • Dec 10 '24

Markup is Functional Oriented

5 Upvotes

r/JavaScriptTips • • Nov 13 '24

Understanding Bitwise Shifts in JavaScript: << and >>

Thumbnail trevorlasn.com
5 Upvotes

r/JavaScriptTips • • Sep 28 '24

Learn how to read nested callbacks

5 Upvotes

I came across a post on r/learnjavascript where the OP was asking about the mental framework to have for understanding nested callback code.

Most of the comments there didn’t answer the OP's question. They suggested that we shouldn’t be writing such code and should instead use promises. While that’s valid advice, what if you are reading someone else's code? How do you make sense of it?

Since I can’t cover everything here, I’ve written an article based on that example. It begins by explaining how such code is written. Once you understand how it’s constructed, you will also learn how to read it.

Give it a read!


r/JavaScriptTips • • Feb 04 '24

Learning vanilla/NodeJS

5 Upvotes

Hello i need resources to effectively help me learn vanilla js without going through youtube...please help i dont want to get overwhelmed and quit again...i already have a little experience


r/JavaScriptTips • • Jan 21 '24

Pokémon Auto Image Slideshow using HTML CSS and JavaScript

Thumbnail
youtu.be
5 Upvotes

r/JavaScriptTips • • Nov 21 '23

Learn Javascript Visually

5 Upvotes

I created this channel on Youtube aiming at teaching how to code visually. I hope I can acheive it. I made some videos up until now and want to make it richer.

I know the visual element is poor or non-existent now, but I promise to make it better.

https://www.youtube.com/channel/UCcA0KbVo49DlEyHZe8Mk0Aw


r/JavaScriptTips • • Oct 10 '23

How to Create a Sticky On Scroll Effect with JavaScript

5 Upvotes

r/JavaScriptTips • • Jul 31 '23

Useful AI tool for developer https://www.unit-test.dev/ - helps to quickly create unit tests for your code

5 Upvotes

r/JavaScriptTips • • Jun 17 '23

Where to start (Web-development, [re-]lreaning JavaScript) ?

5 Upvotes

As the title suggests I have started coding like 2 years ago and learned the basics of JS, HTML and CSS and a little bit beyond, my biggest project was my own discord-bot with lots of features and customization but after that I've not coded often, I ventured into other IT-sections like privacy, security and learning Linux. Now since I've realized I currently really suck at coding I want to improve my coding-skills now again and thought it would be good to start (or better said end) with Web Development. My problem is I don't really know where to start - I thought APIs would be maybe a starting point and I like the idea behind APIs and want to learn coding with them but not sure since I think I have to probably learn the basics again. I found a site called w3schools and it looks promising but I wanted to know if you reddit-people have better or other useful resources for me :)
Please help me as this is something I wanted to learn for a while now, thanks in advance! :)


r/JavaScriptTips • • Apr 20 '23

Best of unknown JavaScript features

5 Upvotes

r/JavaScriptTips • • Apr 15 '23

How to Check if Variable is Defined in JavaScript

5 Upvotes

Introduction: In JavaScript, it is important to know if a variable is defined or not before using it. If a variable is not defined, attempting to use it can lead to errors in the code. Therefore, it is necessary to check if a variable is defined before using it.

There are a few ways to check if a variable is defined in JavaScript, and in this response, we will discuss them.

Method 1: Using typeof operator One way to check if a variable is defined is by using the typeof operator. The typeof operator returns a string that represents the type of the operand. If the variable is not defined, the typeof operator returns the string "undefined".

Example:

if (typeof variableName === "undefined") {
  console.log("variableName is not defined");
} else {
  console.log("variableName is defined");
}

Method 2: Using the 'in' operator Another way to check if a variable is defined is by using the in operator. The in operator checks if a property exists in an object. Since variables are properties of the global object in JavaScript, we can use the in operator to check if a variable is defined.

Example:

if ("variableName" in window) {
  console.log("variableName is defined");
} else {
  console.log("variableName is not defined");
}

In this response, we discussed three ways to check if a variable is defined in JavaScript: using the typeof operator, using the in operator, and using the typeof operator with an undeclared variable. Checking if a variable is defined before using it can prevent errors in your code and ensure that your code runs smoothly.


r/JavaScriptTips • • Mar 30 '23

Debugging JavaScript in Chrome DevTools | STOP using console log everytime

Thumbnail
youtube.com
5 Upvotes

r/JavaScriptTips • • Mar 10 '23

3 Ways to Convert Strings to Numbers in Vanilla JavaScript

5 Upvotes

Here are 3 ways to convert strings into numbers in JavaScript:

  1. Use the Number() object - This is the best method to use, It takes care of point numbers as well.

  2. Use the parseInt() and parseFloat() methods - Be sure to include the radix parameter for parseInt(), and use parseFloat() if you want to retain the decimal part. Also, Be aware that they will silently stop parsing if it encounters non-numeric characters.

  3. Implicit Coercing to Number - you can use the unary plus, Math.floor(), or Math.round() methods.

Remember to choose the method that best fits your specific use case. For further reading and more details, check out the article.


r/JavaScriptTips • • Jan 20 '23

JavaScript beginner

5 Upvotes

Hi guys! I want to start learning JavaScript, which book do you recommend me to start from the begining?


r/JavaScriptTips • • Dec 31 '22

Learning to code? Best strategy?

5 Upvotes

So I’ve been sloooowly but surely learning about the basics of coding html,css and JavaScript. I am In no way comfortable with using them yet and putting it to practice. I realize I learn best doing a project and then learning as I go. Seeing it put in use is obviously the best way to learn. Since I’m a beginner tho can anyone recommend how to go about it. Should I just make a mock website. I guess I’m just looking for advice and tips.


r/JavaScriptTips • • Dec 17 '22

JavaScript questions in Frontend Interview?

5 Upvotes

Hi everybody! I would like to know, based on your experience which ones are the most common questions you have had in your frontend or javascript interviews?


r/JavaScriptTips • • Dec 11 '22

I'm trying to write a function that puts objects I create with it into an array by the variable used to create it, but so far I'm only able to get the object itself in the array. Can someone point in the in right direction as to what I may be missing? I'd want circles to be [circle1, circle2] output

Post image
5 Upvotes

r/JavaScriptTips • • Nov 27 '22

A beginner’s guide to parse and create XML with Node.js

Thumbnail
geshan.com.np
5 Upvotes

r/JavaScriptTips • • Nov 21 '22

Understanding Prototypes in JavaScript

5 Upvotes

In programming, we often want to take something and extend it.

As an example, we have an animal object with its properties and methods. We want to make cat
and dog objects with certain properties and methods on top of animal. We’d like to reuse what we have in animal, not copy/reimplement its methods, just build a new object on top of it.

Prototypes are the underlying feature in JavaScript that makes it possible for objects to inherit and share properties among themselves.

Check out the post to understand what prototypes really are and how they help in inheritance.


r/JavaScriptTips • • Nov 12 '22

Weather App with openwebmaster API and CSS, HTML

Thumbnail
youtu.be
5 Upvotes

r/JavaScriptTips • • Oct 20 '22

leetcode for frontend series | Part 5 of 97

5 Upvotes

A tricky question on scope in JavaScript with 2 different approaches explained. Solving these type of questions will tremendously strengthen your knowledge in JavaScript.

link - https://www.youtube.com/watch?v=6H1VpuT7rVE


r/JavaScriptTips • • Oct 11 '22

How to use NPM Chalk to colorize and format your console output

Thumbnail
geshan.com.np
5 Upvotes

r/JavaScriptTips • • Sep 23 '22

Introduction to ReactJS

Thumbnail
medium.com
5 Upvotes

r/JavaScriptTips • • Sep 19 '22

Can someone please explain why this code works

Thumbnail
gallery
5 Upvotes