JSFiddle - React, Tailwind, and code Playground
by lavisha99
JavaScript
function Bid(username, value) {
this.username = username; // Defining 'username' as a property of the Bid object
this.value = value; // Defining 'value' as a property of the Bid object
this.barray=[];
this.arraysi=function(){
this.barray.push('agxvzfsg raert ')
}
}
let add= new Bid('asdf',4);
console.log(add);
console.log(add.arraysi);
/*
function auction(itemName){
this.itemName = itemName;
this.bidsArray = [];
this.addBid = function zd(username, value){
//let miss = ;
this.bidsArray.push(new Bid(username, value));
}
}
let iphone = new auction('iphone');
iphone.addBid('L',2);
iphone.addBid('K', 2);
console.log(iphone);
console.log(iphone.bidsArray);
*/