0
Why isn’t it working? Only test 4 is failed.
https://sololearn.com/coach/611/?ref=app I pass all the test except the hidden 4th test. Does anyone have an idea why? function main() { var prodID = readLine(); var price = parseInt(readLine(),10); var discount = parseInt(readLine(),10); var prod1= new Product(prodID, price); console.log(prod1.prodID + " price: " + prod1.price); prod1.changePrice(discount); console.log(prod1.prodID + " new price: " + prod1.price); } function Product(prodID, price) { this.prodID = prodID; this.price = price; this.changePrice = function(discount) { //your code goes here this.price = price - (discount/100 * price); } }
3 Respostas
+ 3
Andrey These challenges were added recently and some bugs have been found (many solved already). This appears to be one of them. We have to wait for SoloLearn to edit the test case.
0
Share code link if you will share problem link it wont show your code.