My footsteps

package ex01; import java.util.Arrays; import java.util.Comparator; public class Ex01 { public static void main(String[] args) { // int 배열의 최댓값을 리턴하는 메서드를 작성하세요 Ex01class array = new Ex01class(); int[] nums = {1, 3, 7, 13, 3, 22, 5, 1}; // int maxIntNum = array.getMaxNum(nums); // long 배열의 최댓값을 리턴하는 오버로딩 메서드 nums를 작성하세요 // long[] nums = {1, 3, 7, 13, 3, 22, 5, 1}; // long maxLongNum = array.getM..

//토요 스터디 // 조건문 // ✏️ 1부터 30까지의 숫자 중 반복문과 조건문을 사용하여 4의 배수만 출력되도록 코드를 작성하세요 // for(let i=0; i curr ? max : curr); // 삼항연산자 (참 ? 거짓) // }); // } // let result = findMax(nums); // console.log(result); // 나이가 20살 이상인 학생을 모두 찾아 name을 프로퍼티로 가진 객체 배열을 리턴하는 함수를 작성하세요 // 결과 : [{name: "뉴렉이"}, {name: "맥북이"}] const students = [ { name: "뉴렉이", age: 20 }, { name: "맥북이", age: 23 }, { name: "갤럭이", age: 19 }, ];..

✏️ 화살표 함수와 친해지기 주석처리된 함수들을 ??에 화살표 함수로 바꾸어 보아요 function add(x, y) { return x + y; } const add = (x,y) => x+y; add(1,2); console.log(add(1,2)); //---------------------------------------------------1 function printName({name}) { //name객체가 안에 담겨있음 console.log('name : ', name); //name객체값 출력 } const cat = { name: "tory", }; const printName = ({name}) => { console.log(name); } printName(cat); //cat객체를..

// 너무 딥하게 말고 자유롭게 해보셔요들 class Exam { constructor(math = 0) { //생성자 this.math = math; } } const exam = new Exam(80); const { math } = exam; // ⭐️ math = 80 const { math: mathScore = 90 } = exam; //math > 키 mathScore > 값 console.log(`'math : ' ${math}`); //80나올듯???? 답:80 console.log(`'mathScore : ' ${mathScore}`); //90나올거같음 답:80 // 함수 인자에서의 구조 분해 function printExam({ math }) { // ⭐️ console.log(ma..

🔥 ES5 이하의 시절의 문제점을 잘 알아둔상태에서 ES6 이후 문법을 사용합시다 🔥 ✏️ ES6이전에 사용된 var 변수의 문제점들은 어떤 것들이 있었나요? : 지역화 안됨, 변수 선언 중복이 가능하고 덮어씌워져서 고립화가 불가능하다 ✏️ var를 대체하기 위해 나온 키워드들은 무엇인가요? : let(값의 재할당 가능) const(값의 재할당 불가능) ✏️ JS의 ‘class’는 내부적으로 ?????으로 동작한다 : funtion() 함수 ✏️ spread operator [tip] JS 배열 복사하기 const nums = [1, 2, 3]; const copy = [...nums]; // nums !== copy : ...붙이는거는 값만 복사하는 것이고 이것을 '깊은 복사'라고 표현한다 ✏️ res..