Snippets tagged “objects”
23 snippets use this tag.
- How to Check for the Existence of Nested JavaScript Object KeyJavaScript
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.
- How to Check if a Key Exists in JavaScript ObjectJavaScript
This snippet is explaining how to check whether a key exists in a JavaScript object. Examine the solutions given above and choose the most appropriate.
- How to Check if JavaScript Object is EmptyJavaScript
Read this tutorial and find methods of checking whether a JavaScript object is empty or not. Choose the best one for you and get the code immediately.
- How to check if my string is equal to null?Java
To check if a string is equal to null in Java, you can use the == operator.
- How to Convert an Integer into a String with PHPPHP
In this short guide, we will assist you to deal with one of the common issues in PHP: converting an integer into a string. Read it and follow the examples.
- How to Count the Number if Keys/Properties of a JavaScript objectJavaScript
It is frequently necessary to count the number of keys/properties of an object in JavaScript. Find several solutions to that issue in this short tutorial.
- How to Declare Constants in JavaScript?JavaScript
Read this tutorial and learn useful information about declaring a constant by using the const keyword which creates a read-only reference to the value.
- How to Display a JavaScript ObjectJavaScript
Sometimes it is necessary to display a JavaScript object. With the help of the given tutorial, you will find the best solutions to displaying an object.
- How to Fix the "Invalid Argument Supplied for Foreach()" PHP ErrorPHP
The "invalid argument supplied for foreach()" is considered a common PHP error. With the help of this tutorial, you will figure out how to resolve it.
- How to Get the First Key Name of a JavaScript ObjectJavaScript
Read this JavaScript tutorial and learn about two methods of getting the first key name of an object. Get one-liner codes and make your work done properly.
- How to Get the Index of an Array that Contains Objects in JavaScriptJavaScript
Read this JavaScript tutorial and learn several useful, fast and simple methods that are used for getting the index of an array that contains objects.
- How to initialize an array of objects in JavaJava
Here is an example of how you can initialize an array of objects in Java:
- How to Pass Variables by Reference in PHPPHP
Working with variables is an essential part of a developer’s life. In this snippet, we will demonstrate to you how to pass variables by reference with PHP.
- How to Remove Objects from a JavaScript Associative ArrayJavaScript
JavaScript objects can be taught of associative arrays mapping keys to values. Read and find the method used to remove objects from an associative array.
- How to Unset a JavaScript VariableJavaScript
Read this JavaScript tutorial to know why you cannot delete the property that is created with var. Also, know in which cases you shouldn’t use the operator.
- How to Use serialize() and unserialize() in PHPPHP
This tutorial can be quite helpful for you, if you are interested in using the PHP serialize() and unserialized() functions in your programming practice.
- Is Java "pass-by-reference" or "pass-by-value"?Java
In Java, arguments are passed to methods by value. This means that when you pass an argument to a method, the method receives a copy of the argument rather than a reference to the original object.
- Is JavaScript a Pass-by-reference or Pass-by-value language?JavaScript
On this page, we will look into pass-by-reference and pass-by-value. Let’s explore their differences and find out what language JavaScript is considered.
- PHP - Extracting a property from an array of objectsPHP
To extract a property from an array of objects in PHP, you can use the array_column function.
- PHP : Remove object from arrayPHP
Here is an example of how to remove an object from an array of objects in PHP:
- PHP: Storing 'objects' inside the $_SESSIONPHP
In PHP, the $_SESSION superglobal is used to store data that needs to persist across multiple page requests.
- What is the “new” Keyword in JavaScriptJavaScript
Here, you will find a quick overview of the “new” keyword in JavaScript. You need to understand it properly for the more effective usage of JavaScript.
- What is the Difference Between JSON.stringify and JSON.parseJavaScript
Read this JavaScript tutorial and learn about two useful JSON methods that are used for converting JavaScript object into string and vice versa easily.