Ankitha Reddy has Published 69 Articles

What is the difference between for...of and for...in statements in JavaScript?

Ankitha Reddy

Ankitha Reddy

Updated on 15-Jun-2020 12:16:31

258 Views

for…in loopThe “for...in” loop is used to loop through an object's properties.Here’s the syntax −Syntaxfor (variablename in object) { statement or block to execute }You can try to run the following example to implement ‘for-in’ loop. It prints the web browser’s Navigator objectExampleLive Demo var aProperty; document.write("Navigator Object ... Read More

How to specify that an element should be pre-selected when the page loads in HTML?

Ankitha Reddy

Ankitha Reddy

Updated on 28-May-2020 00:22:39

189 Views

Use the checked attribute to specify an element is to be pre-selected on page load. The attribute works with − .ExampleYou can try to run the following code to implement checked attribute in HTML − Live Demo           Which sports do you like?                 Football           Cricket           Hockey                    

What is runtime polymorphism or dynamic method overloading?

Ankitha Reddy

Ankitha Reddy

Updated on 05-Mar-2020 12:29:43

1K+ Views

Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. Method overriding by a subclass is termed as runtime polymorphism. JVM determines the method to ... Read More

SAP Fiori suitable for mobile application development

Ankitha Reddy

Ankitha Reddy

Updated on 14-Feb-2020 10:42:37

206 Views

Note that sap.ui.commons is an old desktop library and sap.m is old mobile library.There are various JavaScript and CSS libraries that you can use in combination for the application development. SAPUI5 can use these libraries in combination and they are called SAPUI5 control libraries.Sap.m is the most common control library and ... Read More

How to catch exceptions in JavaScript?

Ankitha Reddy

Ankitha Reddy

Updated on 16-Jan-2020 09:15:08

340 Views

To catch exceptions in JavaScript, use try…catch…finally. JavaScript implements the try...catch...finally construct as well as the throw operator to handle exceptions.You can catch programmer-generated and runtime exceptions, but you cannot catch JavaScript syntax errors.ExampleYou can try to run the following code to learn how to catch exceptions in JavaScript − Live ... Read More

How to call functions in JavaScript?

Ankitha Reddy

Ankitha Reddy

Updated on 09-Jan-2020 06:48:02

235 Views

A function is a group of reusable code which can be called anywhere in your program. This eliminates the need of writing the same code repeatedly. It helps programmers in writing modular codes.The most common way to define a function in JavaScript is by using the function keyword, followed by ... Read More

How to break a loop in JavaScript?

Ankitha Reddy

Ankitha Reddy

Updated on 08-Jan-2020 08:31:10

394 Views

The break statement is used to break a loop and continue executing the code, which is after the loop.ExampleYou can try to run the following code to break a loop in JavaScriptLive Demo                          var text ... Read More

What is operator binding in Python?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:22

486 Views

For expressions like − a == b first the python interpreter looks up the __eq__() method on the object a. If it finds that, then executes that with b as argument, ie, a.__eq__(b). If this method returns a NotImplemented, then it tries doind just the reverse, ie, it ... Read More

How to use sockets in JavaScriptHTML?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:22

229 Views

To use sockets, consider the WebSocket interface in JavaScript. This interface enables web applications to maintain bidirectional communications with server-side processes. To enable Web applications to maintain bidirectional communications with server-side processes, this specification introduces the WebSocket interface. Here are some of the methods to workaround with Web Sockets − ... Read More

How to generate statistical graphs using Python?

Ankitha Reddy

Ankitha Reddy

Updated on 30-Jul-2019 22:30:22

430 Views

Python has an amazing graph plotting library called matplotlib. It is the most popular graphing and data visualization module for Python. You can start plotting graphs using 3 lines! For example, from matplotlib import pyplot as plt # Plot to canvas plt.plot([1, 2, 3], [4, 5, 1]) ... Read More

Advertisements