You must hand in by using git
bitbucket.org,
gitlab.com, or
github.com,
git push your local repo to the above remote repo.
node_modules/
.gitignore file.
Send a mail to <nmla@iba.dk> with:
handin <subjectname>'
in the subject line of your mail
Write three functions:
addVat(a), that returns amount including vat
given an amount as input.
subVat(a), that returns amount excluding vat
given an amount as input.
calcVat(a), that returns the vat from the given
amount.
Use the Danish vat of 25.0%.
Hand in as a file called jsFuncs0.js
Write three functions:
first(s), that returns
the first character of the string s.
last(s), that returns
the last character of the string s.
middle(s), that returns
whatever is between the first and the last character of the
string s.
Hint: Take a look a the string
functions in your
MDN reference, especially
the substr function.
Hand in as one file called jsTextUtils.js
In todays lesson, I gave you play() that could
flip a coin. We have, in the lesson about conditionals, worked
with throwing a die. On principle this there is only one tiny
difference between the two.
Now, I want you to identify this difference, and then alter
play, so that it accomodates coin flipping, die
throwing, turning a spindle with any number of sides, and even
a roulette.
Place the function in myFuncLib.js.