Javascript Assignment 13 - [Array 배열]
1. myArray 배열을 만들어주세요.
- makeArray 함수의 리턴값은 [1, 100, "Yes!", true] 가 되어야 합니다.
function makeArray() {
// write your code below
const myArray = [1, 100, "Yes!", true];
// Do not change code below
return myArray;
}
console.log(makeArray()) // [1, 100, "Yes!", true];
2. makeSandWich 배열을 만들어주세요.
- makeSandWich 함수의 리턴값은 ["peanut butter", "jelly", "bread"] 가 되어야 합니다.
function makeSandWich() {
const sandwich = ["peanut butter", "jelly", "bread"];
return sandwich;
}
console.log(makeSandWich()) // ["peanut butter", "jelly", "bread"];