dobara declare kar sakte hai
dobara value Asign kar sakte hai
funciton scope
dobara declare NAHI kar sakte hai
dobara value Asign kar sakte hai
block scope
dobara declare NAHI kar sakte hai
dobara value Asign NAHI kar sakte hai
block scope
first create Class and create function in class
2nd create object from class
3rd call object with class function
if we have class-A and class-B, we use in new class-C (class-A property and method and class-b property and method) so thats call Class Inheritance
jab hum kisi new CLASS me kisi or purane class ki property or method ko use karte hai to useee Class Inheritance kehte hai
file, funciton, variable, class ko import ya export karne ke liye modules ka use kia jata hai
export let name = "jitender"
export function hello (){ retun 'hello world'}
export class student {}
import {name} from './file1.js'
import {hello} from './file1.js'
import {student} from './file1.js'
consol.log(name)
hello()
let create_obj1 = new student()
Xampp or Wamp Server
Live Server Extention on Editors
Above p tag show on live server only
promise ki condition resolve ho jati hai to function call hota hai then(()=>{})
promise ki condition reject ho jati hai to function call hota hai catch(()=>{})
let promName = new promise()
promise ke ander ek funtion hota hai or useee function ke 2 parameter hote hai. (resolve, reject)
let promName = new promise(function(resolve, reject){} )
promise me 2 condition hoti hai RESOLVE or REJECT resolve ke liye then() function ka use hota hai or reject ke liye catch function ka