Labaratoriya ishi -3 class ClassName {


Download 10.61 Kb.
Sana19.11.2020
Hajmi10.61 Kb.
#147914
Bog'liq
3-lab


315-18 guruh talabasi

Qayimov.J

Labaratoriya ishi -3

class ClassName {

constructor(A, B, C, D) {

thsi.A = A;

thsi.B = B;

thsi.C = C;

thsi.D = D;

}

}



let chiqarish = new ClassName(1, 2, 3, 4);

document.write(chiqarish);

function change(A, B, C, D) {

this.A = A;

this.B = B;

this.C = C;

this.D = D;

this.draw = function () {

document.write('UZGARTIRISH');

}

}



const ekran = new Display(1);

ekran.uzgar = 5, 6, 7, 8;

document.write(ekran);

var sonlar = [1, 2, 3, 4];

function Yigindi() {

summ = 0;

for (var i = 0; i < sonlar.length; i++) {

summ = +sonlar[i];

}

document.write(summ);



}

let min = (array, min = array[0]) => {

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

if (min > array[i]) min = array[i];

}

return min;



};

let min = (array, max = array[0]) => {

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

if (max < array[i]) max = array[i];

}

return max;



};

const arry = [1, 2, 4, 8, 6, 0];



console.log("Minimum Value of on array element:"+min(arry));

console.log("Maximum Value of on array element:"+max(arry));
Download 10.61 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling