What exactly is the difference between {?}
and {#}
?
--
After a little test, listing all truthy/falsy values for {?}
, and comparing them to {#}
:
context:
{
values: [
// false
'',
"",
false,
null,
undefined,
[],
// true
0,
"0",
"null",
"undefined",
"false",
{},
{a: 'a'}
]
}
template:
{#values}
{?.}true{:else}false{/.}
{/values}
{~n}
{#values}
{#.}true{:else}false{/.}
{/values}
it outputs EXACTLY the same result:
falsefalsefalsefalsefalsefalsetruetruetruetruetruetruetrue
falsefalsefalsefalsefalsefalsetruetruetruetruetruetruetrue
--
Is really there any difference between them ?