Magic EdTech

 


// console.log(1)  //1

// let promise= new Promise((resolve,reject)=>{

//   console.log(2)

//   setTimeout(() => {

// console.log(12)

//     resolve('foo');

//   }, 10); 


// })

// console.log(3) //3 

// promise

// .then(data=>{

//         console.log(4,data)

// })

// .catch(data=>{

//         console.log(5,data)

// })

// console.log(7)

// setTimeout(()=>{

// console.log(6)

// },0)

// //macro --6, (foo12)


// //1

// //3

// //7

// //2--> 

// //6

// //12

// //4 ,foo

//Question: Given an array of integers, find two numbers such that they add up to a specific target value. Implement the function and optimize it for time complexity.


// nums = [ 7, 11, 15,5]

// target = 7


// //output: [0,1]



// let map =new Map();

// // { }


// for(let i=0;i<nums.length;i++){

//   let varFind = target-nums[i];

  

//   if(map.has(varFind)){


//     console.log([map.get(varFind),i])

//   }

//   else{

//     map.set(nums[i],i)

//   }


// }


// {}


const p=new Promise((resolve,rej)=>


rej('hello')

)


// p.then((data)=>console.log(data))

// .catch((err)=> console.log(err.message))



// async function call(){

//   try{

//       const myPromise= await p;

  

//   console.log(myPromise)

//   }

//   catch((err)=> )

  


  

// }




// call()


//proms




//css2 and css3

//erroboundary


//redux

async await

//getting so much data from the api

//pagination / infinite scroll

// search the data

//two sum

// inline vs block

// css box modal

//promises

//async await

//not defined undefined null

//csrf

//xss












Comments

Popular posts from this blog

TO the new

4048