Milstone-4: Module-17

Assalamualaikum!

I am Nizam

Student of Batch-7

Module-22:Javascript Simple Coding Problem

Video 22-0 : foo() bar() Practise task explanation

Video 22-1 : String comparison using toLowerCase toUpperCase

Video 22-2 : Apply Search includes, indexOf, startswith, endswith

Video 22-3 : How to split, slice, substr, substring, concat, join

Video 22-4 : Math, abs, pow, round, ceil, floor, and random number

Video 22-5 : Swap variable, swap without temp, destructing

Video 22-6 : Can you find out who will get the delicious cake?

Video 22-7 : Who is the tallest? Find the max number in an array

Video 22-8 : Reverse a string and Reverse words in a sentence

Video 22-9 : (advanced) Create a Fibonacci Series using a for loop

Video 22-10: Module Summary and where you need to focus

QUIZ

Q1: Which line will generate a random number between 0 to 10?
Ans: Math.round(Math.random()*10);

Q2: If you are adding all the numbers of an array and storing the total in a variable called “total”. What should be the initial value of total?
Ans: var total = 0;

Q3: Find the largest?
var a = 5;
var b = 8;
var c = 4;
var d = 6;
var highest =___?___(a, b, c, d);
Ans: Math.max

Q4: Which of the following can be found by applying Math.floor for 13.67?
Ans: 13

Q5: what would be the output?
const number = -78;
const answer = Math.abs(number);
console.log(answer);
Ans: 78

Q6: The Fibonacci series looks like:
Ans: 0,1,1,2,3,5,8,13,..

Q7: Can you update the value of a variable declared using const?
Ans: Sorry, it will give an error

Q8: Which condition will print hello?
var a=2;
var b=3;
if(a___?___b){
console.log(“Hello”);
}
Ans: <

Q9: How will you get the sum from a function?
function add(a, b){
____?____ a + b;
}
Ans: return

Q10: What would be the output of the code below?
function add(a, b){
return a + b;
}
console.log(add("adam" + "eve"))
Ans: adameveundefined

THE END

Copyright ©2023 Allright Reserved