Hi guys I am new in this website,I am a beginner with front end development. I have already subscribed to other challenges platforms.but I cannot get how this one works in terms of inserting the code in order to make it successfully works.
There are things like “readlines” etc and I don’t know how to analyze the code in order to see it.
For istance I have just solved the problem “Id and Ship” with the following problem code :
FLOW010
Here my solution which it works btw as output,but it does not work on the website (Instead of console.log I have inserted print because I noticed it is used for printing output)
class letterClassId {
constructor(letter) {
this.letter = letter;
}
printId() {
if (this.letter === “B” || this.letter === “b”) print(“BattleShip”);
if (this.letter === “C” || this.letter === “c”) print(“Cruiser”);
if (this.letter === “D” || this.letter === “d”) print(“Destroyer”);
if (this.letter === “F” || this.letter === “f”) print(“Frigate”);
}
}
let newShip = new letterClassId(“B”).printId();