Open in app

Sign In

Write

Sign In

Sherlynn
Sherlynn

325 Followers

Home

About

Published in

JavaScript in Plain English

·Jan 16, 2021

Use Function Expressions Instead of Function Declarations in JavaScript

At work, I have observed different ways of creating functions in the codebase — and that lead me to search for answers on when to use which (declaration versus expression). This articles aims to share why using function expressions is generally preferred over using function declarations. JavaScript has two different…

JavaScript

3 min read

Use Function Expressions Instead of Function Declarations in JavaScript
Use Function Expressions Instead of Function Declarations in JavaScript
JavaScript

3 min read


May 7, 2020

TypeScript — What & Why You Should Use It

In my current project, we’re using TypeScript (rather than pure Javascript) for a large-scale application with Node.JS on the server side. …

JavaScript

4 min read

TypeScript — What & Why You Should Use It
TypeScript — What & Why You Should Use It
JavaScript

4 min read


Dec 29, 2019

Async/Await in Asynchronous Javascript

To handle asynchronous Javascript, callbacks were first used but it had major cons like callback hell. Then came about promises to try to improve things. However, .then chains can also get nested and confusing. So now, we have async/await, which was introduced in NodeJS 7.6 …

JavaScript

3 min read

Async/Await in Asynchronous Javascript
Async/Await in Asynchronous Javascript
JavaScript

3 min read


Aug 31, 2019

Javascript ES6 Array & Object Destructuring

ES6 introduced a number of significant improvements to the language, including de-structuring of Objects and Arrays. Array Destructuring Traditionally, to access elements in an Array, you would do so with their index number like so: const array = [1, 2, 3]; console.log(array[0]) // 1 Javascript ES6 allows you to assign the array…

ES6

2 min read

Javascript ES6 Array & Object Destructuring
Javascript ES6 Array & Object Destructuring
ES6

2 min read


Published in

The Startup

·Aug 18, 2019

Use Promises over Callbacks, and How to Create a New Promise in Javascript

Promises are widely used instead of callbacks. Promises are a great feature in Javascript that enable you to avoid callback hell, especially when you need to wait on a response from multiple API requests that are asynchronous. A Promise is a special Javascript object that represents the eventual result of…

JavaScript

2 min read

Use Promises over Callbacks, and how to create a new Promise in Javascript
Use Promises over Callbacks, and how to create a new Promise in Javascript
JavaScript

2 min read


Aug 18, 2019

How To Handle Errors in Asynchronous Javascript Code (when working with Callbacks)

We will use a simple function called calculateSquare to demonstrate how to handle errors in asynchronous Javascript code. In order to simulate an asynchronous function, we will use setTimeout: function calculateSquare(number, callback) { setTimeout(() => { const result = number * number; callback(result); }, 1000); } // callback function that…

JavaScript

4 min read

How To Handle Errors in Asynchronous Javascript Code (when working with Callbacks)
How To Handle Errors in Asynchronous Javascript Code (when working with Callbacks)
JavaScript

4 min read


Jan 27, 2019

Run multiple NodeJS versions with Node Version Manager (NVM) — for MacOS

If you use Node.js for your applications, you may want to use different versions of Node. Fortunately, there is a tool to manage them all using Node Version Manager. Node.js

JavaScript

3 min read

Run multiple NodeJS versions with Node Version Manager (NVM) — for MacOS
Run multiple NodeJS versions with Node Version Manager (NVM) — for MacOS
JavaScript

3 min read


Jan 23, 2019

Javascript: Splitting an array into chunks (utility function)

For a work project, I needed to include a wizard form with 2 questions on each page. To get the total page count, I divided the total number of questions by 2 and then rounded it off to the nearest integer. …

JavaScript

2 min read

Javascript: Splitting an array into chunks (utility function)
Javascript: Splitting an array into chunks (utility function)
JavaScript

2 min read


Jan 20, 2019

Javascript Templating Language and Engine— Mustache.js with Node and Express

Javascript Templating Javascript templating is a fast and efficient technique to render client-side view templates with Javascript by using a JSON data source. The template is HTML markup, with added templating tags that will either insert variables or run programming logic. The template engine then replaces variables and instances declared in a…

JavaScript

3 min read

Javascript Templating Language and Engine— Mustache.js with Node and Express
Javascript Templating Language and Engine— Mustache.js with Node and Express
JavaScript

3 min read


Jan 1, 2019

React + Redux Form — Two ways to add initial values

My work projects rely heavily on the use of Redux Form (paired with React). A problem I struggled with was trying to figure out how to pre-populate my form with initial values. …

React

2 min read

React + Redux Form —  Two ways to add initial values
React + Redux Form —  Two ways to add initial values
React

2 min read

Sherlynn

Sherlynn

325 Followers

Software Engineer

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams