Important_JavaScript_Notes
Important_JavaScript_Notes
1. Basics of JavaScript
Features of JavaScript:
- Case-sensitive.
Comparison Operators:
2. JavaScript Objects
Creating Objects:
var person = {
firstname: "John",
lastname: "Doe",
age: 30,
eyecolor: "blue"
};
let car = {
get color() { return this.defColor; },
};
Event Handlers:
<body onload="welcome()"></body>
<script>
</script>
String Methods:
Array Methods:
Cookies:
Read:
6. Interactive Elements
Slideshow Example:
var index = 0;
function nextSlide() {
document.getElementById("slide").src = images[index];
<select onchange="window.location=this.value;">
<option value="https://www.google.com">Google</option>
</select>
7. Regular Expressions
Search Method:
8. Form Validation
function validate() {