Open in app

Sign In

Write

Sign In

John Au-Yeung
John Au-Yeung

78K Followers

Home

About

Published in

JavaScript in Plain English

·2 days ago

How to Display JSON Output Using React

Sometimes, we want to display JSON output in our React components. In this article, we’ll look at how to display JSON output in our React components. Display JSON Output Using React with the JSON.stringify Method We can display JSON output in our React components with the JSON.stringify method. For instance, we can write: import React, { useEffect, useState }…

Programming

2 min read

How to Display JSON Output Using React
How to Display JSON Output Using React
Programming

2 min read


Published in

JavaScript in Plain English

·6 days ago

How to Put a File in a State Variable with React Hooks?

Sometimes, we want to put a file in a state variable with React Hooks. In this article, we’ll look at how to put a file in a state variable with React Hooks. Put a File in a State Variable with React Hooks We can put a file in a state variable with the useState hook. For instance, we can write: …

Programming

2 min read

How to Put a File in a State Variable with React Hooks?
How to Put a File in a State Variable with React Hooks?
Programming

2 min read


Published in

JavaScript in Plain English

·May 24

How to Determine the Number of Days in a Month with JavaScript?

Sometimes, we want to determine the number of days in a month with JavaScript. In this article, we’ll look at how to determine the number of days in a month with JavaScript. Determine the Number of Days in a Month with Plain JavaScript We can use the getDate method to get the number of days in a month with JavaScript. For…

Programming

2 min read

How to Determine the Number of Days in a Month with JavaScript?
How to Determine the Number of Days in a Month with JavaScript?
Programming

2 min read


Published in

JavaScript in Plain English

·May 20

How to Make a Number a Percentage with JavaScript?

Sometimes, we want to make a number a percentage with JavaScript. In this article, we’ll look at how to make a number a percentage with JavaScript. Make a Number a Percentage with JavaScript with Arithmetic We can make a number a percentage with basic arithmetic operators. For instance, we can write: const number1 = 4.954848; const number2 = 5.9797; console.log(Math.floor((number1 /…

Programming

2 min read

How to Make a Number a Percentage with JavaScript?
How to Make a Number a Percentage with JavaScript?
Programming

2 min read


Published in

JavaScript in Plain English

·May 17

How to Play a Notification Sound on Websites with JavaScript?

Sometimes, we want to play a notification sound on websites with JavaScript. In this article, we’ll look at how to play a notification sound on websites with JavaScript. Play a Notification Sound on Websites with JavaScript with the Audio Constructor We can play a notification sound on websites with JavaScript by creating an audio player object with the Audio constructor. For instance…

Programming

2 min read

How to Play a Notification Sound on Websites with JavaScript?
How to Play a Notification Sound on Websites with JavaScript?
Programming

2 min read


Published in

JavaScript in Plain English

·May 13

How to Paste Text as Plain Text into a Content Editable Element with JavaScript?

Sometimes, we want to paste text as plain text into a content editable element with JavaScript. In this article, we’ll look at how to paste text as plain text into a content editable element with JavaScript. Paste Text as Plain Text into a Content Editable Element with JavaScript We can paste plain text into a content editable element by listening to the…

Programming

2 min read

How to Paste Text as Plain Text into a Content Editable Element with JavaScript?
How to Paste Text as Plain Text into a Content Editable Element with JavaScript?
Programming

2 min read


Published in

JavaScript in Plain English

·May 10

How to Check if the Response of a Fetch is a JSON Object in JavaScript?

Sometimes, we want to check if a response of a fetch call is a JSON object with JavaScript. In this article, we’ll look at how to check if a response of a fetch call is a JSON object with JavaScript. Check if the Response of a Fetch is a JSON Object in JavaScript We can check if a response of a fetch call…

Programming

2 min read

How to Check if the Response of a Fetch is a JSON Object in JavaScript?
How to Check if the Response of a Fetch is a JSON Object in JavaScript?
Programming

2 min read


Published in

JavaScript in Plain English

·May 6

How to Create an img Element with JavaScript?

Sometimes, we want to create an HTML img element with JavaScript. In this article, we’ll look at how to create an HTML img element with JavaScript. Create an img Element with JavaScript with the Image Constructor One way to create an img element with JavaScript is to use the Image constructor. For instance, we can write: const img = new…

Programming

2 min read

How to Create an img Element with JavaScript?
How to Create an img Element with JavaScript?
Programming

2 min read


Published in

JavaScript in Plain English

·May 3

How to Create an HTML Table Using JavaScript

Sometimes, we want to create an HTML table with JavaScript. In this article, we’ll look at how to create an HTML table with JavaScript. Create an HTML Table Using JavaScript We can create an HTML table with the document.createElement method. For instance, if we have the following HTML: <div> </div> Then we can create the table…

Programming

2 min read

How to Create an HTML Table Using JavaScript
How to Create an HTML Table Using JavaScript
Programming

2 min read


Published in

JavaScript in Plain English

·Apr 29

How to Add Line Breaks into the HTML5 Canvas with fillText?

Sometimes, we want to add line breaks into the HTML5 canvas with the canvas context fillText method. In this article, we’ll look at how to add line breaks into the HTML5 canvas with the canvas context fillText method. Add Line Breaks into the HTML5 Canvas with fillText We can split the text string by the line breaks and position…

Programming

2 min read

How to Add Line Breaks into the HTML5 Canvas with fillText?
How to Add Line Breaks into the HTML5 Canvas with fillText?
Programming

2 min read

John Au-Yeung

John Au-Yeung

78K Followers

Web developer. Check out https://thewebdev.info. Email me at hohanga@gmail.com

Following
  • Matthew Donnellon

    Matthew Donnellon

  • Henry Tirla

    Henry Tirla

  • Brooke

    Brooke

  • Toni Crowe

    Toni Crowe

  • Don Simkovich, MA

    Don Simkovich, MA

See all (6,416)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams