#!/usr/bin/env bash
# Exercise 3.5 with the keyboard only. Run it with: bash practice.sh
# "code practice/test.js" opens the file in VS Code; a script cannot type into an editor, so it writes the line with printf.
set -e
cd "$(mktemp -d)"

echo '$ mkdir practice'
mkdir practice
echo '$ code practice/test.js'
printf 'console.log(365 * 24);\n' > practice/test.js
echo '$ cat practice/test.js'
cat practice/test.js
echo '$ node practice/test.js'
node practice/test.js
echo "# 8760 is the number of hours in a year that is not a leap year (365 days × 24 hours)."
