129. Exercise: Objects And Arrays For Facebook App

변지영·2021년 12월 9일
0

file: exercise7

// Create an object and an array which we will use in our facebook exercise.

// 1. Create an object that has properties "username" and "password". Fill those values in with strings.

var user={
	username : "hailey",
	password : 1234
}

// 2. Create an array which contains the object you have made above and name the array "database".

// 3. Create an array called "newsfeed" which contains 3 objects with properties "username" and "timeline".

// Create an object and an array which we will use in our facebook exercise. 

// 1. Create an object that has properties "username" and "password". Fill those values in with strings.

var user = {
	username : "hailey",
	password : "zero"
}

// 2. Create an array which contains the object you have made above and name the array "database".
var database = [
	{
		username : "hailey",
		password : "zero"
	}
];
// 3. Create an array called "newsfeed" which contains 3 objects with properties "username" and "timeline".
var newsfeed = [
	{	
		username : "hailey",
		timeline : "zero"
	},
	
	{	
		username : "tailey",
		timeline : "one"
	},
	
	{	
		username : "kailey",
		timeline : "two"
	}	
]

0개의 댓글