It works, but running echo -e doesn't output anything in Bash unless both the posix and xpg_echo options are enabled, as the -e is then interpreted as an option:
$ help echo
echo: echo [-neE] [arg ...]
Write arguments to the standard output.
Display the ARGs, separated by a single space character and followed by a
newline, on the standard output.
Options:
-n do not append a newline
-e enable interpretation of the following backslash escapes
-E explicitly suppress interpretation of backslash escapes
Use
printf "%s\n" "$var"
instead.
And as cas notes in a comment, Bash's declare -p var (typeset -p var in ksh and, zsh and yash (and bash)) can be used to tell the exact type and contents of a variable.