### 谁抄谁?英雄所见略同!
* js-ES6, python, PHP 连接字符串比较
* Jinja, Twig(PHP), Twig.js 模板引擎比较
--------------------------
### js-ES6, python, PHP 连接字符串比较
```js
// js-ES6
var name1 = "Peace";
var age1 = 88;
res = `Hello,${name1}, your age is ${age1}`;
```
```python
#python
name1 = "Peace";
age1 = 88
res = f"Hello,{name1}, your age is {age1}"
```
```PHP
# PHP
$name1 = "Peace";
$age1 = 88;
$res = "Hello,{$name1}, your age is {$age1}";
```
--------------------------
### Jinja, Twig(PHP), Twig.js 模板引擎比较
* Twig(PHP) : The flexible, fast, and secure template engine for PHP.
* Jinja2 : is one of the most used template engines for Python.
* Twig.js : is a pure JavaScript implementation of the Twig PHP templating language.
参考:
* https://twig.symfony.com/
* https://palletsprojects.com/p/jinja/
* https://github.com/twigjs/twig.js/wiki
```
{% extends "layout.html" %}
{% block body %}
{% endblock %}
```
```
My Webpage
{{ a_variable }}
```
```
{% twig_js name="greeting" %}
Hello {{ name|default("World") }}!
```