Categories
JavaScript

The power of JavaScript slice method

When dealing with JavaScript Array we need all the help we can get. One of the methods that we can use is the JavaScript slice. .slice()method returns a copy of the original array into a new array, without modification of the original array. .slice() is accepting two parameters. The first one is starting index and […]

Categories
JavaScript

What is JavaScript used for?

If you are a beginner in web development, where ever you go you hear about JavaScript. Today we are going to break it down and explain what is JavaScript and what is JavaScript used for. JavaScript is the most popular language for 9 consecutive years, according to StackOverflow. It is one of the three core […]

Categories
JavaScript

JavaScript replaceWith – how to use it

I remember the time when JavaScript was not this good. We had to use libraries and frameworks, like jQuery, to do some basic stuff much easier. I remember the time when JavaScript replaceWith – like functions and methods were just a dream. There are times when we need to remove one element and replace it […]

Categories
JavaScript

JavaScript Arrays filter method

After map method we are continuing our series on JavaScript Arrays methods. Today we are going to take a look at filter method. According to MDN: The filter() method creates a new array with all elements that pass the test implemented by the provided function. What does this mean? It means that you pass criteria […]

Categories
JavaScript Tips&Tricks

console.log in JavaScript – Tips & Tricks

One of the most used feature in JavaScript is console.log(), especially for debugging. Even though it is widely used most of the time we do not utilize all the power and possiblities of console.log(). console.log This is the most famous and most popular way of logging, even though we have some more ways, but let’ […]

Categories
JavaScript

JavaScript Arrays map method

Map method in JavaScript was introduced with ES-5. This is third article on JavaScript Arrays. If you haven’ t read first and second, please do. First two articles were little longer than we expected, so we will try to keep this one short. According to MDN: The map() method creates a new array populated with […]

Categories
JavaScript

Array loops in JavaScript

JavaScript Arrays is huge area, so we split this topic in multiple articles. If you haven’ t read part one you can read it: JavaScript Arrays – Manipulating data. This time we are covering array loops in Javascript and how to use loops to iterate over an arrays. Loop is a code/function that runs until […]

Categories
JavaScript

JavaScript Arrays – Manipulating data

JavaScript Arrays are list-like objects whose prototype has methods to perform traversal and mutation operations, according to MDN. Arrays are one of the basic Data storing/manipulating/handling things you will encounter when first starting with almost any programming language, if not all of them. Simply put: Arrays are simple way of storing data. In JavaScript, unlike […]

Categories
JavaScript

How to select element(s) using vanilla JavaScript?

You don’t need jQuery to perform simple element selection. I bet you wrote million times $(“#element”), or $(“.elements”) just to select something. Modern DOM API gives you everything you need to select elements, by ID, by Class, by Tag, by Attributes, by Pseudo-Class, yeah literally by anything that comes to your mind. Select element by […]