Files
Harshit-Sachdev/Week-3/Day-1/Javascript-notes.md

31 lines
611 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## JavaScript Functions
Functions are reusable blocks of code used to perform a specific task.
### Types of functions:
- Function Declaration
- Function Expression
- Arrow Functions (ES6)
### Benefits:
- Code reusability
- Better structure
- Easier debugging
## JavaScript Objects
Objects store data in keyvalue pairs.
const user = {
name: "Harshit",
role: "Intern",
skills: ["HTML", "CSS", "JS"]
};
### Object concepts:
- Properties
- Methods
- Access using dot and bracket notation
### Practical Learning
- Created reusable functions
- Accessed object properties
- Used functions inside objects