How-to articles, tricks, and solutions about FUNCTION
To call a PHP function using an onclick event, you will need to use a little bit of JavaScript.
Yes, you can pass an array as a parameter to a function in PHP.
In PHP, global variables can be accessed and modified from within functions using the global keyword.
In PHP, you can use the is_float() function to check if a variable is a decimal number.
The console.log() method outputs a message to the web console. Read the tutorial and learn the simplest method of putting a single or multiple styles to it.
Lambdas, also known as anonymous functions, are useful in Python because they allow you to create small, one-time use functions without having to define them with a full function statement.
The file_get_contents() function in PHP is used to read a file and return its contents as a string.
You can call a function from another .py file by importing the file and then calling the function.
Function decorators allow you to wrap a function in another function.
Read the tutorial and learn the two suggested methods of creating a JavaScript function that will add a class to the <div> element and solve your problem.
To add new elements you can use the following JavaScript functions: push() unshift(), concat() function or splice(). See examples.
In Python, you can use the built-in upper() method to change a string to uppercase.
Read this JavaScript tutorial and learn the easy way of changing the href attribute for a hyperlink step by step by using one of the methods of jQuery.
In this tutorial, you will find several methods that are used to test the existence of the nested JavaScript object keys. Also, find how to avoid TypeError.
Checking the data type of the value can be misleading. Read this tutorial and learn which operator is used to check if a value is an object in JavaScript.
Read this JavaScript tutorial and learn several fast and useful methods that are invoked for checking whether the variable is of function type or not.
Read this tutorial and learn valuable information about the multiple methods that are used for checking if the element contains a class in JavaScript.
Read this tutorial and learn the methods of checking whether the specified object has the specified property in JavaScript. Find the fastest one for you.
Read the tutorial and find out one of the methods of checking whether the element is visible after scrolling with jQuery. Also, find about utility function.
In this tutorial, you will read and learn information about the two methods of checking whether a function exists in JavaScript or it has not been defined.
Read the tutorial and find how you can convert the UNIX timestamp to time in JavaScript to make the Unix format date-time value in a user-readable format.
Read this tutorial and learn the way of making a JavaScript string all lowercase and uppercase with the help of toLowerCase() and toUpperCase() functions.
Read this JavaScript tutorial and learn about the fastest methods of converting object into string. Read about JSON.stringify() and toString() methods.
Read this JavaScript tutorial and learn information about the combinations of methods that make it possible to convert the string to title case easily.
Read this JavaScript tutorial and learn several useful methods of copying array items into another array. Get to know which method to choose for your case.