Exercises for Objects | javascript | Web Development Course

preview_player
Показать описание

Notes of this Lecture:
Рекомендации по теме
Комментарии
Автор

for exercise 2,
we can also do this:
function stringConcat(separator, ...strings) {
for (let i = 0; i < strings.length; i++) {
var arr;
if (i == 0) {
arr = strings[i];
}
else {
arr = arr + separator + strings[i];
}

}
return arr;
}

princyjain
Автор

For the match stick question, 5 * num + 1 would be even simpler formula.

ayushmaantomar
Автор

matchstik's problem this is more simpler
function nms(nhouse){
matchsticks=5*nhouse+1
return matchsticks
}
console.log(nms(1))
console.log(nms(4))
console.log(nms(87))

devanshrao
Автор

exercise 4

function matchHouse(num){
let total = num*6;
let ballance = total - (num-1)

console.log(ballance)
}

matchHouse(5)

SYEDABDULWAHAB-ev
Автор

ex no 4 :-
let x = prompt("Enter the no of house you want to to build");
let z = x - 1;
y = x * 6 - z;
console.log(y)

scientifictech
Автор

For Exercise 04
we can also do this :

function matchHouses(house) {
let sticks = 0;
for (let i = 0; i < house; i++){
sticks = house * 6 - i;
}
return sticks;
}

henilpatel
Автор

thanku bhaiya. love and respect to the work that you do for us.

Jay-ibtr
Автор

14:55 solution:
function matchNumber(matchHouse){
console.log (matchHouse* 5 +1);
}
matchNumber(1);
matchNumber(2);
matchNumber(3);
matchNumber(4);
matchNumber(5);

Edited after watching your solution:


function matchNumber(matchHouse){
if(matchHouse <1){
console.log(0);
}else{
console.log (matchHouse* 5 +1);
}
}
matchNumber(0);
matchNumber(1);
matchNumber(2);
matchNumber(3);
matchNumber(4);
matchNumber(5);

kishorisahoo
Автор

Requesting to make a video on "Business Intelligence (BI) "

amark
Автор

Sir/ mam final year project ke releted koi video bano na plz🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏 urgently 🙏🙏

Roshan-ucqw
Автор

Last question
let sticks = (house<1)?0:(5*house + 1);
console.log(sticks)
Reply if this is wrong....

rhythmtouchessoul
Автор

Thank you very much bhaiya plz next lature uplode get quickly

IqraEnglish
Автор

Please start the complete series of React.js from beginning to advance

mdnadeemasgar
Автор

I feel difficulty in built logic in
Programming.
Java is my first language i want to be good in it...but how?

hasnainhaider_
Автор

bhai factory function, constructor function or rest operator kab parhaya ?
video no. ?

Walid-Sahab
Автор

sir you didn't even call the function got output is 100?

pavansaibitla
Автор

requesting you guys to do a course on Database management system

knachithkumar
Автор

let squer ={
side :5,
get area (){
return this.side*this.side
}
}
squer.side=10;

isme apne side 5 kyo likha hai

kishannikaju
Автор

Anyone who learn web developement without btech

aashishmehra
Автор

rest operator konse lecture me tha
can anyone help??

anoopbhatt