JavaScript(29)
-
STS Javascript 자동완성 지원 설정
Help > Install New Software.Update: https://download.eclipse.org/wildwebdeveloper/releases/latest/ Eclipse software repository | The Eclipse FoundationThe Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 360 open source projects, including runtimes, tools and frameworks.download.eclipse.org재시작
2024.12.01 -
Javascript에서 null 체크 간단하게 하기
&&를 사용해서, 먼저 객체가 null이 아닐 경우, 객체의 opertation이 작동하도록 함 만약 interaction이 null이거나 undefined이면 false가 되고, 결과값은 null이 됨 undoButton = interaction && interaction.getUndoButton(),
2024.11.24 -
Javascript 날짜 포멧 설정
const now = new Date();// Create a custom format: YYYY-MM-DD HH:mm:ssconst year = now.getFullYear();const month = (now.getMonth() + 1).toString().padStart(2, '0'); // Month is zero-basedconst day = now.getDate().toString().padStart(2, '0');const hours = now.getHours().toString().padStart(2, '0');const minutes = now.getMinutes().toString().padStart(2, '0');const seconds = now.getSeconds().toStrin..
2024.11.24 -
Javascript List에 컬럼 및 row 추가
데이터let data = [ { name: 'Alice', age: 25 }, { name: 'Bob', age: 30 }, { name: 'Charlie', age: 35 },];컬럼추가for (let i = 0; i 변수값을 컬럼으로 사용for (let i = 0; i row 추가// Define the new row as an arraylet newRow = ['Charlie', 35];// Add the new row to the tabletable.push(newRow);
2024.11.23 -
Javascript ==와 ===의 차이점
==: 데이터만 비교함===: 데이터와 데이터 타입까지 비교함
2024.11.23 -
Javascript 날짜 포멧 설정하기
오라클이나, 자바처럼 formatter같은게 없는 것 같음HH24MIfunction formatDateToHH24MM(date) { // Extract hours and minutes let hours = date.getHours().toString().padStart(2, '0'); // Ensure 2 digits let minutes = date.getMinutes().toString().padStart(2, '0'); // Ensure 2 digits // Return formatted string return hours + minutes;}YYYMMDDfunction getYearMonthDay(date) { let year = date.getFullYear();..
2024.11.23