Avoid single line output from function

I am new to shell scripting and wished to get few things clarified.
While calling functions within shell script, output comes out as single line irrespective of the no of echos or newlines I tried within function +
the echo -e used to invoke function ( as instructed online) :

#!/bin/sh
inc() {
local value=4
echo "value is $value within the function\\n"
echo "\\b\$1 is $1 within the function"
}
value=5
echo value is $value before the function
echo "\$1 is $1 before the function"
echo
echo -e $(inc $value)
echo
echo value is $value after the function
echo "\$1 is $1 after the function"

Output comes as :

-e value is 4 within the function$1 is 5 within the function

Need output as :

value is 4 within the function
$1 is 5 within the function

Kindly suggest right way to invoke.

The behavior of echo when given any options and when given any operands that contain any backslash characters varies from shell to shell, OS to OS, and on some operating systems with some shells depending on environment variables in place when the script is run. For portability and consistent behavior across shells and operating systems, use printf instead of echo in these cases.

#!/bin/sh
inc() {
local value=4
echo "value is $value within the function"
printf '$1 is %s within the function\n' "$1"
}
value=5
echo value is $value before the function
printf '$1 is %s before the function\n' "$1"
printf '\n%s\n\n' "$(inc $value)"
echo value is $value after the function
printf '$1 is %s after the function\n' "$1"

The meaning of local inside a function definition also varies from shell to shell, but since that doesn't seem to be a problem for you, I've left it as is.

If you were expecting -e to allow escape sequences in echo and you weren't expecting escape sequences to work without -e ; what were you expecting:

echo "\\b\$1"

to do?