about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2024-05-29 22:30:54 -0400
committerelioat <hi@eli.li>2024-05-29 22:30:54 -0400
commit7c274a16b7e21d71ab08a8dc4a720c331b5af481 (patch)
tree33a6b28463c4d570feaa495dd3c924a148205b47
parent959d3ef474a2d9d8433d49fedfbc64e9d4b4190a (diff)
downloadtour-7c274a16b7e21d71ab08a8dc4a720c331b5af481.tar.gz
*
-rw-r--r--js/freelance.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/freelance.js b/js/freelance.js
new file mode 100644
index 0000000..29e0705
--- /dev/null
+++ b/js/freelance.js
@@ -0,0 +1,18 @@
+// can I go freelance?
+
+const a = (r,h,w,ws) => {
+	let income = ((r * h) * w);
+	let tax = income * 0.16; // as of 2024 actual tax rate is more like 15.3%, but I'm rounding to 16%
+	income -= tax;
+	let savings = ws * w;
+	income -= savings;
+	return {
+		income: income,
+		savings: savings, 
+		tax: tax
+	};
+}
+
+const m = a(125,24,48,300);
+
+console.log(`annual income: $${m.income}, annual savings: $${m.savings}, annual tax: $${m.tax}`);
\ No newline at end of file