Assalamualaikum!

I am Nizam

Student of Batch-7

Module-31 Practice

Video 31-0 What matters in this milestone

Video 31-1 Recap of DOM Manipulation and event handler

Friend-1

Lorem ipsum dolor sit amet.

Friend-2

Eius porro vel quibusdam quia?

Friend-3

Voluptates quisquam tempora aliquid temporibus.

Friend-4

Architecto suscipit asperiores laudantium molestias!

Friend-5

Reiciendis porro delectus magnam eos.

Video 31-2: ES6 Intro difference between var, Let and const

Video 31-3 Function default parameter for not provided values

Video 31-4 Template string, multiple line string, dynamic string

Video 31-5 Arrow function, multiple parameter, function bod

Video 31-6 More Arrow functions and big arrow function

Video 31-7 Spread operator, array max, copy arrays

Video 31-8 (advanced) Object and Array Destructuring

Video 31-8 31-9 Module Summary and Practice Problems

QUIZ

Q1: How will you add 25 as the first element of the array? const numbers = [45, 12, 36, 84]
Ans: unshift()

Q2: What would be the output? function getSum(a, b=9){return a+b;} console.log(getSum(2, 7));
Ans: 9

Q3: What will be the value of z? const y = x => x*x; const z = y(5);
Ans: 25

Q4: const name = 'Hero';
const greetings = 'Welcome Home!'+' '+name; Re-write the greetings variable using ES6 template literals to print Welcome Home! Hero.
Ans: const greetings = `Welcome Home! ${name}`;

Q5: Choose the correct answer about ES6 template string from the following options.
Ans: All of the above

Q6: How can you declare an arrow function with no parameters?(Ask google mama.)
Ans: const myFunc = () => console.log('Nayok!');

Q7: const division= num1, num2 => console.log(num1 /num2)
If you call the above function division(4,2) , what will you get in the console?
Ans: Syntax error

Q8: const nayikas=['mousumi' , 'popy' ,'shabnur', 'purnima' ]. How can you make a copy of nayikas using a spread operator?
Ans: const array2 = [...nayikas]

Q9: How will you get the biggest number? const numbers=[10,20,30,40.50.60.70 ]
Ans: Math.max(...numbers)

Q10:What would be the value of newCars?
const cars=['toyota', 'honda','mercedes'];
cons newCars= [...cars , 'ferrari'];
Ans: ['toyota', 'honda', 'marcendes', 'ferrari'

THE END

Copyright ©2023 Allright Reserved