- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
The colon (:) can be used when you want to define the property to an object while equal (=) can be used when you want to assign a value to a variable.
Following is the code −
To run the above program, you need to use the below command −
Here, my file name is demo325.js.
This will produce the following output −
- How to use Turing machines to recognize languages in TOC?
- When to use i++ or ++i in C++?
- When and how to use pack or grid layouts in tkinter?
- How to recognize mood disorder and treat it?
- How to recognize and protect yourself from Cybercrime?
- When to use an abstract class and when to use an interface in Java?
- When to use inline function and when not to use it in C/C++?
- When to use tuples in C#?
- When to use MyISAM and InnoDB?