https://github.com/iftekheraziz/mastering-javascript-objects
Mastering JavaScript Objects
https://github.com/iftekheraziz/mastering-javascript-objects
css3 es6-javascript html5 javascript modern-javascript
Last synced: 24 days ago
JSON representation
Mastering JavaScript Objects
- Host: GitHub
- URL: https://github.com/iftekheraziz/mastering-javascript-objects
- Owner: IftekherAziz
- Created: 2023-02-27T12:50:57.000Z (almost 3 years ago)
- Default Branch: Main
- Last Pushed: 2023-02-27T18:26:00.000Z (almost 3 years ago)
- Last Synced: 2025-01-14T08:12:17.815Z (about 1 year ago)
- Topics: css3, es6-javascript, html5, javascript, modern-javascript
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
// Multiple wasys to create object:
1. Object literal syntax - (Important)
2. Object constructor
3. Constructor Function
4. ES6 class - (Important)
5. Object.create()
--> What is object and what are the types of object?
--> What is method and constructor?
--> What is keys, values, entries , pair, delete, seal and freeze ?
--> What is obbject immutability? What is different between seal and freeze ?
--> When we use for of loop , for in loop ? Difference between them.
--> What are the 3 ways to read object properties?
--> What is distructaring of the object properties ?
--> Comapring objects, referential integrity, give example.
--> What is borrow method of the object properties?
--> Describe call, apply and bind methods.
--> What is the useage of this keyword in javascript?
--> What is window in javascript?
1. Which one is not a way to create an object?
- using JSON.stringify()
2. Call methods accepts _____
- this value and parameter separated by commas
3. What are the purposes of Object.seal()?
- Preventing new properties from being added
4. How will you obtain the key-value pair from the nayok object?
const nayok = {name: ‘hero’, age:’28’, isMarried: false};
- Object.entries(nayok)
5. Why do we use the bind method?
- To borrow method from another object
6. How will you loop through all the properties of an object?
- Using for in loop
7. const obj ={a:1, b:7, c:3, length:2};
console.log(Object.keys(obj).length);
What will be the output?
- 4
8. const obj1= {module: 35, video:2};
const obj2= {module: 35, video:2};
console.log(obj1 === obj2);
- false
9. What would be the output of?:
const getGirlFriend= (name = "chokina")=>"name";
console.log(getGirlFriend());
- name
10. What is a window in JavaScript? Google and read carefully.
- A global variable, window, representing the window in which the script is running .