Concurso finalizado. En breve comunicaremos los ganadores y haremos entrega de los premios. ¡Muchas gracias a todos los participantes!
Participa en nuestro sorteo Front End Challenge y demuestra tus conocimientos.
¿Qué tres errores puedes identificar en este código?
// class BountyHunter
function BountyHunter(name) {
this.weapon = ‘blaster’;
this.name = name;
}
BountyHunter.prototype.shoot = function() {
console.log(this.name, ‘shoot his’, this.weapon);
}
BountyHunter.prototype.fly = function() {
console.log(this.name, ‘jetpack mode on!’);
}
// class Clone extends BountyHunter
function Clone(name, id) {
BountyHunter();
this.id = id();
}
Clone.prototype = Object.create(BountyHunter.prototype);
Clone.prototype.constructor = Clone;
var CLONE_NAME = ‘Boba Fett’
(function(name) {
‘use strict’;
var cloneProps = {
id: ‘1712AO’,
buildCloneID: function() {
var cloneTxt = ‘CLONE’;
return cloneTxt.concat(this.id);
}
};
var retrieveID = cloneProps.buildCloneID;
var clone1 = new Clone(name, retrieveID);
clone1.shoot(); // output expected: Boba Fett shoot his blaster
})(CLONE_NAME);
¿Cómo participar en el sorteo?
Muy fácil, solo tienes que seguir estos dos sencillos pasos:
- Identifica los tres errores del código
- Mándanos un email a tengotalento@ing.com con tu respuesta
Te damos una pista, al ejecutarse el código se obtendría el siguiente output: Boba Fett shoot his blaster.
¿Qué sorteamos?
- Un primer premio, en el que se sorteará una SNES Mini y una Raspberry Pi
- 9 Raspberry Pi para los siguientes ganadores
¡Mucha suerte a todos!
El ganador del primer premio del concurso ha sido Gonzalo García Braschi ¡Enhorabuena!