목록Study (20)
알맹이방
//Those arrays are all different according to each code //Check your html file and find location of position and color arrays let pcd_position = document.querySelector('#root').components['sync'].envPointSet....; let pcd_color = document.querySelector('#root').components['sync'].envPointSet....; let width = document.querySelector('#root').components['sync'].envPointSet....; //make file format //..
var integerNum = parseInt(str); // string--> integer var binaryNum = parseInt(str, 2); //binary number라는 것을 컴퓨터에게 알려줌 num > 0 ? "positive" : num 0){ return "positive"; } else if(num < 0){ return "negative"; } else{ return "zero"; } "use strict" //var와 let 차이 function checkScope(){ "use strict"; var i = "function scope"; if(true){ i = "block scope"; console.log..
var random = Math.floor(Math.random() * 20); //0~19까지의 랜덤숫자 function randomnum(){ return Math.floor(Math.random()*10); } console.log(randomnum()); function ourRandomRange(min, max){ return Math.floor(Math.random()*(max-min+1))+min; } var result = ourRandomRange(1, 9); console.log(result); //1부터 9 사이의 랜덤 숫자. //어느 범위든 자유롭게 지정할 수 있음
var myMusic = [ { "artist": "Billy", "title": "Piano Man", "release_year": 1973, "formats": [ "CD", "8T", "LP" ], "gold": true }, { "artist": "Beau", "title": "Cereal Man", "release_year": 2003, "formats": [ "Youtube video" ], "gold": true } ] //manipulating complex objects var myStorage = { "car":{ "inside":{ "glove box": "maps", "passenger seat": "crumbs" }, "outside":{ "trunk": "jack" } } }; ..