
Implements and Extends, Object Oriented TypeScript
15/03/2023Learn the difference between implements and extends in TypeScript. Use Implements to implement interfaces and types, and extends to inherit from classes.
In JavaScript it is possible to call a function using a string. All you need to know is the object the function resides in and the name of the function as a string.
You could do this using eval(), but apparently it is a big ‘no-no’ for security reasons. Here is a safer approach:
function dave(message) {
alert(message);
}
// object[functionString](args)
window['dave']('hello');
Clean and simple, without opening eval(“Pandora’s Box”).
Learn the difference between implements and extends in TypeScript. Use Implements to implement interfaces and types, and extends to inherit from classes.
In this tutorial we will look at using YAML in PHP. Learn about Parsing and Writing YAML files using Symfony's YAML component.
Measuring code execution performance is an important way to identify bottlenecks. Use these methods in JavaScript to help optimise your code.
Find bottlenecks, optimise and clean your code, and speed up your apps by measuring the execution time of your PHP scripts using microtime.
In this tutorial we will learn how to use Basic Authentication with PHP Curl.
Set up a WordPress development environment using Docker Compose. Includes a Docker container with WordPress, MySQL and phpMyAdmin services.
Learn how to regenerate and update WordPress media and image sizes both programmatically (without plugin), and also with a handy plugin.
Ever seen constants like __DIR__ and __FILE__ being used in PHP? These are 'Magic Constants', and this is how we can use them.
Learn how to use event listeners to detect and handle single and multiple keypress events in JavaScript. Add modifier keys to your application!