A junior JavaScript developer will know he can use JavaScript for web development. Isn’t that the only ability of JavaScript? Of course not.
JavaScript’s first mission is to build interactive websites. Now, it gets involved in many other aspects of programming besides websites.
Without any further ado, here are 5 cool things you can build with JavaScript. The best part: you can make money out of them.
We’ve talked enough about using JavaScript to create websites or web apps. Now, it’s time for the special kind of application, games.
Initialized as a language to add more behaviors to websites, JavaScript can be also used to build cool video games. In the past, the browser was only used for displaying information for websites. Now, it even supports playing games. And with the advent of HTML5, playing games on the browser has been taken to the next level. …
I know you care about optimizing your code but sometimes you don’t know how to do it.
Imagine every piece of your code is well optimized, the performance would be great and you can easily investigate your code if having any issue.
So, without any further ado, let’s dive right into the 7 simple JavaScript tips below.
Do you think property names of an object are fixed?
I used to think so until I discover that they can be dynamic.
Here’s how:
let dynamicProperty = ‘author’;let book = {
title: ‘JavaScript Best Practices’,
[dynamicProperty]: ‘Amy Andrews’
};console.log(book); // { title:”JavaScript Best Practices”, author:”Amy Andrews”…
Are you looking for more JavaScript techniques?
If so, you’re in the right place.
In this article, I’ll show you 5 advanced JavaScript techniques I’m using to improve the quality of my codebase.
Let’s get right into it.
Closure is an important technique in Javascript. It means that an inner function always has access to the variables and parameters of its outer function, even after the outer function has returned.
We use closure to protect data that we don’t want to expose to the outer scope.
Let’s say you want to increase a counter
variable one unit every time a button is clicked. …
React is becoming the most popular library in the frontend world.
And with the support of amazing tools, this popular library is even stronger.
What are the tools? Without any further ado, let’s dive into it.
Facebook has created this tool to help you initialize the environment for your new React App.
By using only one single command line, you will get a ready-to-use environment to start developing your app. It offers you useful stuff like frontend build pipeline and optimization for production.
Configuration for a React app is a time-consuming task. …
React is a great library nowadays. It eases the process to build beautiful and smooth web applications.
But there are some common mistakes if you don’t notice, it will create a burden for your project later.
Without any further ado, let’s dive right in to know what mistakes you should avoid when using React.
Superman components are components that can do many things.
I once experienced that kind of component from my coworker. He put many unrelated UI blocks into one component. Then he used a property to control the display for each block. …
Online resources are good enough to learn JavaScript. But books are way better.
They are well-structured.
They are proofread before being published.
They are more in-depth.
So, below are 9 JavaScript books that web developers need to read:
If you’ve been working with JavaScript for a while and want to dig deeper into this interesting language, this book is for you.
The book is only 175 pages long which covers the good and bad parts of JavaScript. It tells you to make use of the good parts and avoid using the bad features of this flexible language.
You will hardly find the second concise and packed with helpful information book like this one. It’d be great if you can have it on your bookshelf. …
How interesting do you want to be? As much as possible, of course.
Interesting people know the secret to making others pay attention to them when they’re talking.
Interesting people have the ability to talk about boring topics in an attractive way.
Interesting people are more likely to succeed in their career paths.
Do you want to become one of them? If so, keep reading the following tips.
What if you can do anything people ask you to do?
They need a website, you can design it.
They need an application, you can develop it.
Or they need a finance article, you can write it. …
When having many members works on a project, it’s a must to have a certain standard to follow for the sake of scalability.
Today, we will talk about the most basic standard, naming conventions: what we should do and shouldn’t.
Let’s get into it.
// Don’t
function fetchData() {}// Do
function fetchUsers() {}
We know fetchData()
would call an API and pull the data from server, but what data? It’s better to name it more specific, right? The more specific, the less time you will spend to think what the names are about without any comments.
Except for the common names like i
for index
in loop statements, you should avoid one-letter names because it will confuse you later. …
Creating a new array that contains a subset of elements of the given array is one of the most common tasks in JavaScript.
Instead of using the loop statements, we can use filter()
to complete that task in a shorter and cleaner way.
Here’s how.
This one is a little tricky. We will make use of the indexOf()
function. It’s a built-in function that returns the first index at which a given element can be found in the array.
We can use it to form a condition for removing duplicated values in an array like below.
const numbers = [3, 12, 54, 12, 4, 4, 3, 12…
I’ve been doing a few jobs. Software development is one of them and it’s a foundation for me to build other careers. And no matter what happens, I’ll keep programming for the rest of my life.
Some people say that keep doing the same job over and over again is boring. Yet it’s not the case for programming. Even if you’ve been into this for a long time, you still find it interesting and fun.
Some developers consider if they should keep coding after 30 or 40. …
About