목록Study (20)
알맹이방
[JavaScript] 객체 생성 (Object)
var ourDog={ "name": "Camper", "legs": 4, "tails": 1, "friends": ["everything!"] }; var myDog = { "name": "Quincy", "legs": 3, "tails": 2, "friends": [] }; //name, legs, tails, friends 는 속성(property)라 한다. ourDog.name = "Happy Camper"; //change property value ourDog['bark'] = "Woof!"; //add new property delete ourDog.bark; //delete property var testObj = { "hat": "ballcap", "shirt": "jersey", "sh..
Study/Javascript
2021. 10. 6. 14:39
[JavaScript] boolean return, null return
function isLess(a, b){ return a
Study/Javascript
2021. 10. 6. 14:24
[JavaScript] switch
function test2(val){ var answer = ""; switch(val){ case 1: case 2: case 3: answer = "Low"; break; case 4: case 5: case 6: answer = "Mid"; break; case 7: case 8: case 9: answer = "High"; break; } }
Study/Javascript
2021. 10. 6. 13:22