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

전체 글375

chapter 8) print out exception ### Basic `try...catch` - Attempts to create an array with an extremely large size, which exceeds the maximum array size limit and throws a `RangeError`. - The `catch` block catches this exception, logs the entire exception object to the console, and then logs specific properties: the exception's name (`exception.name`) and message (`exception.message`). ### Forcibly Raising and Catching Excepti.. 2024. 12. 25.
chapter 8) try catch finally ### `try` and `catch` Example - The first script block demonstrates a basic use of `try` and `catch` without `finally`. It attempts to call a non-existent method (`byeBye`) on an undefined variable (`willExcept`), which results in an exception. - The `try` block is where potentially error-throwing code is placed. Since `willExcept` is not defined, attempting to call `byeBye` on it throws a Refer.. 2024. 12. 24.
chapter 7) Creating a document object first h1 tag inner second div tag inner delete document ### Add and Create Elements - An `` element is dynamically created and styled with JavaScript. - The `textContent` property sets the element's text to `'allocation of document'`. - A custom data attribute `data-custom` is added with the value `'user of difference'`. - The element's text color is set to white, and the background color is set.. 2024. 12. 23.
chapter 7) DomContentLoaded event ### Key Elements of the Script - **`DOMContentLoaded` Event Listener**: The script sets up an event listener for the `DOMContentLoaded` event, which fires when the initial HTML document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading. - **Arrow Function for Creating ``**: Inside the event listener, an arrow function `h1` is defined .. 2024. 12. 22.
728x90
반응형
LIST