I am new in Symfony2 framework and not fully understand how to work with javascripts and how to include theirs in the best way.
What I need: to include jQuery script
Assuming your jquery.min.js is placed under
src/Acme/FooBundle/Resources/public/js/
You can use either
or
{% javascripts
'@AcmeFooBundle/Resources/public/js/jquery.min.js'
%}
{% endjavascripts %}
Into your twig template.
Make sure you installed the assets afterwards or run this command
php app/console assets:install web --symlink