- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 9297 Articles for Object Oriented Programming
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
747 Views
The debugger statement in JavaScript is used for setting a breakpoint in the code. The code stops execution as soon as it encounters the debugger statement and calls the debugger function (if available).Following is the code to implement debugger statement in JavaScript −Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .result { font-size: 20px; font-weight: 500; color: blueviolet; } Debugger statement in JavaScript. CLICK HERE Click on the above ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
98 Views
The yield* expression is used to refer to another generator or iterable object.Following is the code to implement yield* expression/keyword in JavaScript −Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .result { font-size: 20px; font-weight: 500; color: blueviolet; } yield* keyword in JavaScript CLICK HERE Click on the above button to iterate over test2 and see the value yielded let resEle = document.querySelector(".result"); let BtnEle = ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
127 Views
The new.target is a metaproperty that allows us to determine at runtime whether a function or constructor was called using the new keyword or not.Following is the code for new.target in JavaScript −Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .result { font-size: 20px; font-weight: 500; color: blueviolet; } new.target in JavaScript. CLICK HERE Click on the above button to call the Student constructor without the new keyword ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
568 Views
The spread syntax allows us to spread an array or any iterable to be expanded across zero or more arguments in a function call.Following is the code for spread operator in function calls in JavaScript −Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .result { font-size: 20px; font-weight: 500; color: blueviolet; } Spread operator in function calls CLICK HERE Click on the above button to use spread operator to ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
260 Views
An object initializer is an expression that allow us to initialize a newly created object. It is a comma-separated list of zero or more pairs of property names and associated values of an object enclosed in a pair of curly braces {}.Following is the code for object initializer in JavaScript.Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .result { font-size: 20px; font-weight: 500; color: blueviolet; } Object initializer in JavaScript ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
646 Views
Following is the code for accessing an array returned by a function in JavaScript −Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .result { font-size: 20px; font-weight: 500; color: blueviolet; } Accessing an array returned by a function in JavaScript CLICK HERE Click on the above button to return an array from retTable() function and access it let resEle = document.querySelector(".result"); let BtnEle = document.querySelector(".Btn"); function retTable(num) { let tempNum = []; for (i = 1; i { let tableArr = retTable(5); resEle.innerHTML = "tableArr = " + tableArr; }); OutputOn clicking the ‘CLICK HERE’ button −
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
1K+ Views
The loose equality operator ‘==’ allows us to compare two or more operands by converting their value to a common type first and then checking for the equality between them.strict equality operator ‘===’ allows us to compare two or more operands by checking the equality between the values as well as their types . It returns true only if the values and the type both match with the other operand.Following is the code for loose equality vs strict equality in JavaScript −Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
157 Views
The loose equality operator ‘==’ allows us to compare two or more operands by converting their value to a common type first and then checking for the equality between them.Following is the code to implement loose equality in JavaScript −Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .result { font-size: 20px; font-weight: 500; color: blueviolet; } Loose equality in JavaScript. CLICK HERE Click on the above button see some ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
152 Views
The accessor property helps us in implementing getter and setter functions in JavaScript.They execute a function on getting or setting a value.There are four attributes of an accessor property −get − It gets called when a property is read. It doesn’t’ take any arguments/set − It gets called when a property is set. It takes only one argument.enumerable − Allows the object to be iterable when set to true.configurable − When set to false it will not allow to delete the property or change its values.Following is the code for accessor property and its attributes −Example Live Demo ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
120 Views
Following is the code for renaming imports and exports in JavaScript −Note − You need to run a localhost server to run this example.Example Live Demo Document body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .result { font-size: 18px; font-weight: 500; color: rebeccapurple; } Renaming imports and exports in JavaScript CLICK HERE Click on the above button to execute the imported function script.jsimport {test, tellTime as showTime} from "./sample.js"; let resultEle = ... Read More