Horje
how to create an object in javascript Code Example
how to make an object in javascript
let myDog = {		
  legs: value			

}
  console.log(myDog);
/*Doesn't have to be a Dog it can be anyting you want*/
how to create an object in javascript
const person = {
  name: 'Anthony',
  age: 32,
  city: 'Los Angeles',
  occupation: 'Software Developer',
  skills: ['React','JavaScript','HTML','CSS']
}

//Use Template Literal to also log a message to the console
const message = `Hi, I'm ${person.name}. I am ${person.age} years old. I live in ${person.city}. I am a ${person.occupation}.`;
console.log(message);
objects in javascript
var student = {                 // object name
firstName:"Jane",           // list of properties and values
lastName:"Doe",
age:18,
height:170,
fullName : function() {     // object function
   return this.firstName + " " + this.lastName;
}
}; 
objects in javascript
var object = {'key':'value','the value can be anything',[1,null,'Dr.Hippo']};
object in javascript
console.log("hello);




Javascript

Related
javascript find the longest string in array Code Example javascript find the longest string in array Code Example
ternary operator javascript Code Example ternary operator javascript Code Example
arange Code Example arange Code Example
array from javascript Code Example array from javascript Code Example
in compare method why we taking a and b for sorting in javascript Code Example in compare method why we taking a and b for sorting in javascript Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8