Gareth Dunne

21
Apr
How to Add Script to Head in JavaScript – Dynamic Injection

How to Add Script to Head in JavaScript – Dynamic Injection

21 April 2020 When dealing with external libraries and files in your JavaScript header, there are situations where one needs
1 min read
20
Apr

How to add an array element to JSON object in JavaScript.

20 April 2020 From time to time we need to manipulate JSON data by adding new elements into it. A
1 min read
20
Apr

How to add a week to a date in JavaScript?

20 April 2020 Dealing with dates in JavaScript is inevitable. There are so many different situations that require the manipulation
1 min read
19
Apr

How to Exit out of a Function in JavaScript? 3 Great Methods.

19 April 2020 When creating functions with multiple possible returning paths we may need to exit out of the function
1 min read
18
Apr

How to get the current year in JavaScript?

18 April 2020 JavaScript is synonymous with working with Dates. And with that comes a whole host of date manipulation
18
Apr
How to get the hostname from a URL in JavaScript?

How to get the hostname from a URL in JavaScript?

18 April 2020 When dealing with URLs in JavaScript, we often need to get the host value or root URL.
1 min read
18
Apr

How To Concatenate Variables and Strings in JSX and React.js

18 April 2020 When specifying properties of React components, there are many situations where a combination of a string and
1 min read
18
Apr

How to fix JSX is not allowed in files with extension.

18 April 2020 When setting up your ESlint rules, we can run into situations where a predefined rule is not
1 min read
18
Apr

How to get a local IP address in Node.js?

18 April 2020 When building a web application there are times where our program needs to have the value of
1 min read
18
Apr

How to get a file extension in Node.js

18 April 2020 When working inside a node environment, working with file paths and directories is a common occurrence. As
1 min read