Toncho Dev

Front-End Web Development

Sharing knowledge to make the web an amazing place.

πŸ‘€ Sign up for email newsletter or use this RSS feed to get notified of new blog posts!πŸ”₯

Javascript Ternary Operator

Learn the basics of the JavaScript Ternary Operator

Javascript Variables

A variable is an assigned to an identifier, so you can reference and use it later in your program. Learn how to declare variables in JavaScript

Javascript Falsy Values

It is important to know fundamentals to understand why Javascript does the things it does. You will know why things aren’t working, know the falsy values will help you to debug and you will become a better developer.

Javascript Object Lookups

We are going to see how object lookups can sometimes be used as a more maintainable alternative to if and switch statements.

Javascript Array Bifurcate

This is a pattern to split the values from an array into two groups based on a condition, if is truthy the corresponding element belongs to the first group, otherwise it belongs to the second group.

Javascript Array Chunk

We are going to divide or chunk the array into many smaller arrays or subarrays where each one is of a specified length size.

Javascript Object literal conditional properties

We constantly coming up against adding conditional properties to an Object, we are going to use the spread operator and the short-circuit evaluation to deal with it an elegant way.

Javascript Array of Unique Values

Handling array duplicates can be tricky. There are multiple ways to remove duplicates from an array, we are going to take a look of Set constructor and a couple of implementatios of indexOf(), filter(), and forEach() methods.

Javascript Replace All Occurrences of a String

How to replace all ocurrences of a string in Javascript? Lets see 2 easy ways with replace() and split() with join() methods

Nodejs Reading Files

The easiest way to read a file in Node is to use the `fs.readFile()` function to asynchronously reads the entire contents of a file. Alternatively, you can use the synchronous version `fs.readFileSync()`