Created
June 15, 2021 13:24
-
-
Save Danielv123/374cbab41cb4d61b5eba51037cec96ce to your computer and use it in GitHub Desktop.
inflation 1991 to 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wage1991 = 15075; | |
inflation = `2019 1.81% -0.63% | |
2018 2.44% 0.31% | |
2017 2.13% 0.87% | |
2016 1.26% 1.14% | |
2015 0.12% -1.50% | |
2014 1.62% 0.16% | |
2013 1.46% -0.60% | |
2012 2.07% -1.09% | |
2011 3.16% 1.52% | |
2010 1.64% 2.00% | |
2009 -0.36% -4.19% | |
2008 3.84% 0.99% | |
2007 2.85% -0.37% | |
2006 3.23% -0.17% | |
2005 3.39% 0.72% | |
2004 2.68% 0.41% | |
2003 2.27% 0.68% | |
2002 1.59% -1.24% | |
2001 2.83% -0.55% | |
2000 3.38% 1.19% | |
1999 2.19% 0.64% | |
1998 1.55% -0.79% | |
1997 2.34% -0.59% | |
1996 2.93% 0.13% | |
1995 2.81% 0.20% | |
1994 2.61% -0.34% | |
1993 2.95% -0.08% | |
1992 3.03% -1.21% | |
1991 4.24% -1.16%`.split("\n").map(line => line.split("\t")[1].replace("%","")).map(number => Number(number)) | |
wage2019 = wage1991 | |
inflation.forEach(year => wage2019 = wage2019 * (year/100+1)) | |
console.log(`Wage 1991: ${wage1991} is equivalent to ${Math.floor(wage2019)}`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment