@@ -429,17 +429,17 @@ Detailed guide on JavaScript Arrays, covering array manipulation methods, iterat
429
429
Overview of JavaScript Object, its properties, and methods.
430
430
431
431
### Creating an Object
432
- ` const myObject = { key1: 'value1', key2: 'value2' }; ` Object literal with two properties
432
+ - ` const myObject = { key1: 'value1', key2: 'value2' }; ` Object literal with two properties
433
433
434
434
### Accessing Properties
435
435
- ` console.log(myObject.key1); ` 'value1'
436
436
- ` console.log(myObject['key2']); ` 'value2'
437
437
438
438
### Adding Properties
439
- ` myObject.key3 = 'value3'; ` Adding a new property 'key3'
439
+ - ` myObject.key3 = 'value3'; ` Adding a new property 'key3'
440
440
441
441
### Deleting Properties
442
- ` delete myObject.key2; ` Removing property 'key2'
442
+ - ` delete myObject.key2; ` Removing property 'key2'
443
443
444
444
### Methods of the Object Constructor
445
445
- ` Object.assign(target, ...sources) ` Copies values from source to target objects.
@@ -643,7 +643,7 @@ Essential guide to JavaScript's Math object, covering basic constants and mathem
643
643
- ` Math.sqrt(16); ` Square root of 16: Returns 4
644
644
645
645
### Random Number Generation
646
- ` Math.random(); ` Generates a random number between 0 (inclusive) and 1 (exclusive)
646
+ - ` Math.random(); ` Generates a random number between 0 (inclusive) and 1 (exclusive)
647
647
648
648
[ 🔝 Back to Top] ( #top )
649
649
---
@@ -738,7 +738,7 @@ Methods for selecting, creating, and modifying DOM elements.
738
738
- ` element.appendChild(newElement); ` Appends the new element as the last child of the parent element.
739
739
740
740
### Removing elements
741
- ` element.removeChild(child); ` Removes a child node from the DOM.
741
+ - ` element.removeChild(child); ` Removes a child node from the DOM.
742
742
743
743
### Modifying elements
744
744
- ` element.innerHTML = '<p>New HTML content</p>'; ` Changes the HTML content of an element.
0 commit comments