Search
K
Comment on page
🖋

String Practice

Quiz #1

/*
< String basic 1 >
💬 를 적절한 값으로 고쳐주세요!
*/
const str1 = "Vanilla";
const str2 = " ";
const str3 = "Coding";
const result = str1 + str2 + str3;
if (result === 💬) {
alert("🎉");
}

Quiz #2

/*
< String basic 2 >
💬 를 적절한 값으로 고쳐주세요!
*/
const str1 = "Vanilla";
const str2 = "Coding";
const length1 = str1.length;
const length2 = str2.length;
const result = length1 + length2;
if (result === 💬) {
alert("🎉");
}

Quiz #3

/*
< String basic 3 >
💬 를 적절한 값으로 고쳐주세요!
*/
const str = "Vanilla";
const result = str[0];
if (result === 💬) {
alert("🎉");
}

Quiz #4

/*
< String basic 4 >
💬 를 적절한 값으로 고쳐주세요!
*/
const str = "Vanilla";
const result = str[str.length - 1];
if (result === 💬) {
alert("🎉");
}

Quiz #5

/*
제 이름은 Justin 입니다.
여기에서 마지막 글자인 "n" 을 가져오려고 합니다.
💬 를 적절한 값으로 고쳐주세요!
*/
const myName = "Justin";
const lastCharacter = myName[💬];
if (lastCharacter === "n") {
alert("🎉");
}
Last modified 1yr ago