showing results for - "javascript developer salary"
Struan
17 Nov 2016
1class Tunjangan {
2	kids = 0
3	age = {}
4	balita = 0
5	anak = 0
6	remaja = 0
7	sallary = 0
8	sum = 0
9
10	constructor(sallary, kids, age) {
11		this.sallary = sallary
12		this.kids = kids
13		this.age = age
14	}
15
16	validation() {
17		if (this.age.firstKids > 15 || this.age.secondKids > 15) {
18			return Promise.reject(new Error('Maximum age 15 years old'))
19		} else if (this.age.firstKids < 1) {
20			return Promise.reject(new Error('Minimum age 1 years old'))
21		} else if (this.kids > 2) {
22			return Promise.reject(new Error('Maximum 2 children'))
23		} else if (this.kids < 1) {
24			return Promise.reject(new Error('Minimum 1 children'))
25		} else if (this.kids == 1) {
26			this.age.secondKids = 0
27		}
28
29		return true
30	}
31
32	percentageBalita() {
33		const betweenAge = [1, 2, 3, 4, 5]
34		if (betweenAge.includes(this.age.firstKids) || betweenAge.includes(this.age.secondKids)) {
35			betweenAge.includes(this.age.firstKids) && betweenAge.includes(this.age.secondKids)
36				? (this.balita = 5 + 5)
37				: (this.balita = 5)
38		}
39		return this.balita
40	}
41
42	percentageAnak() {
43		const betweenAge = [6, 7, 8, 9, 10]
44		if (betweenAge.includes(this.age.firstKids) || betweenAge.includes(this.age.secondKids)) {
45			betweenAge.includes(this.age.firstKids) && betweenAge.includes(this.age.secondKids) ? (this.anak = 7 + 7) : (this.anak = 7)
46		}
47		return this.anak
48	}
49
50	percentageRemaja() {
51		const betweenAge = [11, 12, 13, 14, 15]
52		if (betweenAge.includes(this.age.firstKids) || betweenAge.includes(this.age.secondKids)) {
53			betweenAge.includes(this.age.firstKids) && betweenAge.includes(this.age.secondKids)
54				? (this.remaja = 10 + 10)
55				: (this.remaja = 10)
56		}
57		return this.remaja
58	}
59
60	percentageAge() {
61		if (typeof this.validation() === 'boolean') {
62			this.percentageBalita()
63			this.percentageAnak()
64			this.percentageRemaja()
65		}
66		return { balita: this.balita, anak: this.anak, remaja: this.remaja }
67	}
68
69	sumTunjanganKids() {
70		const balita = Math.floor((this.percentageAge().balita / 100) * this.sallary)
71		const anak = Math.floor((this.percentageAge().anak / 100) * this.sallary)
72		const remaja = Math.floor((this.percentageAge().remaja / 100) * this.sallary)
73		return { balita, anak, remaja }
74	}
75
76	totalSalaryPlusKids() {
77		const balita = this.sumTunjanganKids().balita
78		const anak = this.sumTunjanganKids().anak
79		const remaja = this.sumTunjanganKids().remaja
80		return this.sallary + balita + anak + remaja
81	}
82
83	reportingTunjangan() {
84		const subTotal = result.totalSalaryPlusKids()
85		const before = `${new Intl.NumberFormat('en-ID', { currency: 'IDR' }).format(this.sallary)}`
86		const after = `${new Intl.NumberFormat('en-ID', { currency: 'IDR' }).format(subTotal)}`
87		return {
88			sallary: {
89				before: `Your current sallary RP.${before}`,
90				after: `Your current sallary + allowence for kids RP.${after}`
91			}
92		}
93	}
94}
95
96const result = new Tunjangan(3500000, 1, { firstKids: 1, secondKids: 0 })
97console.log(result.reportingTunjangan())
Maximilian
12 Jan 2021
1Typically, JavaScript is related to 
2Front End Web Development.
3The typical UK hourly rate is approx £12.20
4for a Web Developer.
queries leading to this page
salary javascript developerjavascript freelance salaryjava script developer salarysalary of javascript developerjavascript develpoer salary in us ajavascript developer salaryjavascript developer anual salarysenior javascript developer salaryjavascript developer salary in bangalorejavascript senior developer salaryassociate javascript developer salarylowest javascript developer salaryjavascript developer salary in usjavascript developervaco salarysa salary for javascript developersjavascript engineer salarywhat is salary of javascript developerjavascript developers salaryjavascript developer annual salaryjavascript programmer salaryjavascript developer salary in the usajavascript develope salaryjs senior developer salarysalary of javascript programmerjavascript developer salary massjavascript junior salarywhat is the salary of javascript developer in usajavascript developers salary americajavascript developer salary irelandjavascript coder salaryjavascript developer salary in usajavascript developer salary canadajs developer salary in usjavascript developer jobs salaryjavascript developer mphasis salaryjavascript junior developer salarysalary for javascript programmerjavascript developer salary in vietnam javascript developer salary usjavascript developer salary in abujajavascript developer salaryjavascript developer salary philippinesjavascript dev salary indiajs developers salarysalary js developersenior javascript developer salary in ushow much salary js developerjs developer salary in indiajavscript developrt salaryjavascript developer salary monthlyjunior javascript developer salaryjavascript developer job salaryjavascript salary appjavascript software engineer salaryjavascript developer salary sri lankajs developer salary usjavascript developer salary infosysjs dev salarywhat is the salary of javascript developerjavascript programmer language salarybasic salary program in javascriptjavascript jobs salaryjavascript developer salary ukjs deverloper salaryjavascript developer salary in the usjavascript developer salary usajava script developer salary in usaverage javascript developer salary in indiajs developer salary in us for begineerjavascript programmer salary ushigh salary for javascript developerjunior javascript engineer salaryjavascript dev salaryjavascript developer salary in united statesjavascript developer salary in bangladeshphp dev salaryjavascript web developer salaryjavascript developer salary indiasalary for javascript developerjs developer salarysalary for javascript developer statisticsjavascript developer salary in indiasenior javascript engineer salaryjavascript developer salary