Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
Alguien me podrĆa ayudar con los proyectos de gestiĆ³n tienda y gestiĆ³n contacto de JavaScript porfavor
Ayuda
3 Respostas
+ 1
El de gestiĆ³n de tienda
function main() {
var increase = parseInt(readLine(), 10);
var prices = [98.99, 15.2, 20, 1026];
//tu cĆ³digo va aquĆ
var arrNew = prices.map (function(i) {
return i + increase;
});
console.log(arrNew);
}
y el de gestiĆ³n de contacto
function Contact(name, number) {
this.name = name;
this.number = number;
this.print = function (){
var x = this.name
var y = this.number
console.log(x+": "+y)
}
}
var a = new Contact("David", 12345);
var b = new Contact("Amy", 987654321)
a.print();
b.print();
+ 1
GESTION DE CONTACTOS
function contact(name, number) {
this.name = name;
this.number = number;
this.print = function(){ console.log(name + ": " + number)
}
}
var a = new contact("David", 12345);
var b = new contact("Amy", 987654321)
a.print();
b.print();
0
Arue Gonzales Maillard gracias