This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const devices = [ | |
{"deviceId":"default","kind":"audioinput","label":"기본값 - 마이크(Realtek Audio)","groupId":"2fc5a70356cd629dff0f57c8c5b420757f34b7f60a40184617607bdf125025f8"}, | |
{"deviceId":"communications","kind":"audioinput","label":"커뮤니케이션 - 마이크(Realtek Audio)","groupId":"2fc5a70356cd629dff0f57c8c5b420757f34b7f60a40184617607bdf125025f8"},{"deviceId":"80f28f21743218d1430300452892a9272426095e48d4ddd344bef16a57e2d7cb","kind":"audioinput","label":"마이크(Realtek Audio)","groupId":"2fc5a70356cd629dff0f57c8c5b420757f34b7f60a40184617607bdf125025f8"},{"deviceId":"7fb6410182a2ef6910e68e942dfa9bd4f29350f391599099ed1563ab6e7ac185","kind":"videoinput","label":"Integrated Webcam (0bda:5689)","groupId":"80117ee788b9447605cce20ce90cefec3f387bb62f2df256e2a1559dac667d41"},{"deviceId":"7fb6410182a2ef6910e68e942dfa9bd4f29350f391599099ed1563ab6e7ac185","kind":"videoinput","label":"test Webcam (0bda:5689)","groupId":"80117ee788b9447605cce20ce90cefec3f387bb62f2df256e2a1559dac667d41"}, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const array = ['dog','cat','fox','dog','hols','cat']; | |
console.log(array); | |
console.log([...new Set(array)]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Looping | |
const items = [1,2,3,4,5,6]; | |
function getAllEvents(items) { | |
//good code | |
return items.fillter(num => num % 2 === 0); | |
//bad code | |
//const result = []; | |
//for (let i = 0; i < items.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Template Literals (Template String) | |
const person = { | |
name: 'Julia', | |
score: 4, | |
}; | |
//bad code | |
console.log( | |
'Hello ' + person.name + ', Your current score is: ' + person.score | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bob = { | |
name: 'Julia', | |
age: 20, | |
}; | |
const anna = { | |
name: 'Julia', | |
age: 20, | |
job: { | |
title: 'Software Engineer' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Spread Syntax - Object | |
const item = { type: 'shirts', size : 'M' }; | |
const detail = { price: 20, made: 'Kores', gender: 'M' }; | |
//bad code | |
item['price'] = detail.price; | |
//bad code | |
const newObject = new Object; | |
newObject['type'] = itme.type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Object Destructuring | |
const person = { | |
name = 'Julia', | |
age = 20, | |
phone: '0102222222' | |
}; | |
//bad code | |
function displayPerson(person){ | |
displayAvatar(person.name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//bad code | |
function getResult(score) { | |
let result; | |
if(score > 5) { | |
result = 'up'; | |
} else if (score <= 5) { | |
result = 'down'; | |
} | |
return result; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//nullidh coalescing operator ?? is only case null, undefined check.' | |
//do not confusing to Logical OR operator || is only case false(0, undefined, null, "",'',``) or true check. | |
//bad code | |
function printMessage(test){ | |
let message = text; | |
if(text == null || text == undefined) { | |
message = 'Nothing to display'; | |
} | |
console.log(message); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
에러이유 : 관리자가 아닌 ms 계정으로 로그인한 윈도우10에서 Visual Studio Code 에서 Vue 개발환경을 설정하던 중 보안 오류가 발생함. | |
해결방법 : | |
d:\sori> Get-ExecutionPolicy -Scope CurrentUser | |
d:\sori> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser | |
d:\sori> Get-ExecutionPolicy -List | |
관련문서 | |
https://docs.microsoft.com/ko-kr/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7 |
NewerOlder