vineeth.mariserla

vineeth.mariserla

72 Articles Published

Articles by vineeth.mariserla

Page 8 of 8

What is the use of Object.isFrozen() method in JavaScript?

vineeth.mariserla
vineeth.mariserla
Updated on 11-Mar-2026 234 Views

Object.isFrozen()Object.isFrozen() method is used to find whether an object is frozen or not. An object is frozen if it followed the below criteriaIt should not be extensible.Its properties should be non-configurable.It shouldn't accept any new properties.SyntaxObject.isFrozen(obj);Parameters - Object.isFrozen() accepts an object as a parameter and scrutinizes whether it is frozen or not and returns a boolean output.ExampleIn the following example Object.isFrozen() scrutinizes whether the object 'obj' is frozen or not. Since the object is not frozen, false will be displayed as the output.    var object = {       prop1 : 5    }    var res = Object.isFrozen(object);   ...

Read More

Push() vs unshift() in JavaScript?

vineeth.mariserla
vineeth.mariserla
Updated on 19-Aug-2019 387 Views

push() vs unshift()The methods push() and unshift() are used to add an element in an array. But they have a slight variation. The method push() is used to add an element at the end of the array, whereas the method unshift() is used to add the element at the start of the array. Let's discuss them in detail.push()syntaxarray.push("element");ExampleIn the following example, to a 3 element array, using push() method another element is added at the back of the array and the result is displayed in the output. var companies = ["Spacex", "Hyperloop", "Solarcity"]; ...

Read More
Showing 71–72 of 72 articles
« Prev 1 4 5 6 7 8 Next »
Advertisements