<nav class="navbar navbar-expand-sm navbar-dark bg-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav4"
aria-controls="navbarNav4" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand font-weight-bold" href="#">あ</a>
<div class="collapse navbar-collapse">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">い</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">う</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">え</a>
</li>
</ul>
//右寄せしたい部分だけulを分けて、ml-autoを追加する
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<button type="button" class="btn btn-outline-light">ログアウト</button>
</li>
</ul>
</div>
</nav>
#改訂版
レスポンシブルに対応
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<a class="navbar-brand text-white">グローバルメニュー</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav4"
aria-controls="navbarNav4" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav4">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link">a</a>
</li>
<li class="nav-item">
<a class="nav-link">b</a>
</li>
<li class="nav-item">
<a class="nav-link">c</a>
</li>
</ul>
</div>
</nav>