Welcome to one of my javascript task portfolio/documentation for sanbercode course.
- (soal1.js) Write a program from the square root of x where x must be an even number, with the following conditions:
- If the user inputs a number less than 0 , the user gets an error message "Cannot input negative numbers"
- If the user inputs an odd number, the user gets an error message "Cannot input an odd number" Hint: use the formula sqrt(x)
- (soal2.js) Suppose there is an API response as follows.
let productBin = { hidden }
As a QA Engineer, you want to check the total quantity of several storageIds for productCode FBR00040101 (FloBrand-DressBSPink). Create a javascript program to add up the quantity of all storageId for the product
Hint: Use the Repetition, Array and Object keys methods (please look for references on how to get the value from json)
File naming explanation:
- soal1.js = taskOne.js
- soal2.js = taskTwo.js + taskTwo.data.js
node taskOne.js
node taskTwo.js
List the key features:
- taskOne.js
- taskTwo.js & taskTwo.data.js