본문 바로가기
728x90
반응형
SMALL

전체 글367

method) querySelector() ### HTML Structure - The body of the document contains an empty `` element. This is the target for the JavaScript code. ### JavaScript Functionality - An event listener is added to the `document` object for the `'DOMContentLoaded'` event. This ensures that the JavaScript code inside the callback function will only run after the initial HTML document has been completely loaded and parsed. - Insid.. 2025. 1. 14.
method) querySelectorAll() method ### HTML Structure - The body of the document contains four empty `` elements. These are the targets for the JavaScript code to modify. ### JavaScript Functionality - Similar to the previous example, an event listener is added to the `document` object for the `'DOMContentLoaded'` event. This ensures the JavaScript code inside the callback function executes only after the entire document has been.. 2025. 1. 13.
method) filter() ### JavaScript Breakdown - **Initialization of the Array**: An array named `numbers` is defined with integers from 0 to 5 inclusive. - **Filtering Even Numbers**: The `filter` method is applied to the `numbers` array. This method takes a callback function that is executed on each element of the array. The callback function returns `true` or `false` for each element based on the condition provide.. 2025. 1. 12.
React Component) change to root component to class component ### Key Components - **External Scripts**: It includes React and ReactDOM from unpkg.com, a global content delivery network (CDN) for everything on npm. The `crossorigin` attribute is used for CORS (Cross-Origin Resource Sharing) requests. Babel standalone is also included to compile JSX code directly in the browser, indicated by the `type="text/babel"` attribute on the script element containing.. 2025. 1. 11.
728x90
반응형
LIST