Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function searchHarga(quantity) {
- var ret
- for(var j=0, arrayLength = checkPrice.length; j < arrayLength ;j++)
- {
- if(j == arrayLength)
- {
- ret = checkPrice[j].price;
- break
- }
- if(j < arrayLength)
- {
- if( (parseInt(quantity) >= parseInt(checkPrice[j].qty)) && (parseInt(quantity) < parseInt(checkPrice[j+1].qty)) ){
- ret = checkPrice[j].price;
- break;
- }
- }
- }
- return ret;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement