I have a problem related to variable declaration. I use browserify, so here I have to require jquery before bootstrap.js. The issue is that I can't undestand what is the problem with the first variant of code?
var $, jQuery;
$ = jQuery = require('./libs/jquery/jquery.min');
require('./libs/bootstrap/bootstrap');
and
var $ = jQuery = require('./libs/jquery/jquery.min');
require('./libs/bootstrap/bootstrap');
First variant doesn't work (console shows me an error that bootstrap needs jquery), second variant is not good enough for Jshint but it works great! Can someone explain why the first variant doesn't work