Monday, November 1, 2021
Object.Create( ) is a static function which can take two arguments. The first argument is the prototype of the object, while the second argument is the properties of the argument. A prototype is a second object that is created with every JavaScript object. It is like a blueprint, or the model that the object is built on. Think of it as a car prototype.
So let's create an object with Object.Create( ) function:
var person = Object.create({
name: "Tech Junkie",
location: "Mars",
hobbie: "Video Games"
});
console.log(person);
Notice how it's different than creating an object with new keyword. In this case you are actually using the object's prototype object.
Here is how the object would look with the new keyword
var person = new Object({
name: "Tech Junkie",
location: "Mars",
hobbie: "Video Games"
});
console.log(person);
So let's create an object with Object.Create( ) function:
var person = Object.create({
name: "Tech Junkie",
location: "Mars",
hobbie: "Video Games"
});
console.log(person);
Here is how the object looks like:
Notice how it's different than creating an object with new keyword. In this case you are actually using the object's prototype object.
Here is how the object would look with the new keyword
var person = new Object({
name: "Tech Junkie",
location: "Mars",
hobbie: "Video Games"
});
console.log(person);
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
Your post is too informative. Thank you for sharing with us.
ReplyDeleteAmazon Alexa Spotify not Working Problems
Amazon Alexa Spotify not Working Issues
Amazon Alexa Spotify not Working
Amazon Alexa Spotify not Responding
Alexa Spotify not Responding Issues
Verizon Email Login Problem
Common Verizon Email Login Issue
Common Verizon Mail Login Problem
Common Verizon Mail Login Issue
Verizon Email Login Problem