1. Join
const fruits = ["Banana", "Orange", "Apple", "Mango"];
let text = fruits.join();
join() returns an array as a string
Output:
Banana,Orange,Apple,Mango
const productPrice = 30
const gstRate = 5
const GST = 30 - [30 * 100 / (100 + 5)]
// GST = Supply Value - [Supply Value x {100/(100+GST%)}]
const vv = 30 - (30 * 100 / 105)
let gstPrice = vv
let gstIncludedPrice = productPrice - gstPrice
let finalPriceIncludedGST = productPrice - gstIncludedPrice
const finalProductPriceIncludedGST = gstIncludedPrice + gstPrice
console.log("GST Price=", gstPrice);
console.log("GST Included Price=", gstIncludedPrice);
console.log("Net Price Included GST=", finalProductPriceIncludedGST);
const finalVal = `GST charged of ${gstRate}% Product Price ${productPrice} = ${GST} `
console.log(finalVal);
Top comments (0)