title: Bootstrap <select> element only gets 1 value
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(()=&gt;{
      $(".userChoice").on("click",()=&gt;{
          var selectedItem = $(".userChoice").val();
          //console.log(selectedItem)
          if(selectedItem = "monthly"){
              console.log(selectedItem);
          }
          else if(selectedItem = "weekly"){
              console.log(selectedItem);
          }
          else if(selectedItem = "daily"){
              console.log(selectedItem);
          }
      })
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;title&gt;DASHBOARD&lt;/title&gt;
  
      &lt;!--Lib css--&gt;
      &lt;!--bootstrap--&gt;
      &lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
          integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"&gt;
      &lt;!--fontawesome--&gt;
      &lt;link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"
          integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"&gt;
  
      &lt;!--jquery--&gt;
      &lt;script src="https://code.jquery.com/jquery-3.5.0.js"
          integrity="sha256-r/AaFHrszJtwpe+tHyNi/XCfMxYpbsRg2Uqn0x3s2zc=" crossorigin="anonymous"&gt;&lt;/script&gt;
  
      &lt;!--own css--&gt;
      &lt;style&gt;
          @import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";
  
          body {
              font-family: 'Poppins', sans-serif;
              background: #fafafa;
          }
  
          p {
              font-family: 'Poppins', sans-serif;
              font-size: 1.1em;
              font-weight: 300;
              line-height: 1.7em;
              color: #999;
          }
  
          a,
          a:hover,
          a:focus {
              color: inherit;
              text-decoration: none;
              transition: all 0.3s;
          }
  
          .navbar {
              padding: 15px 10px;
              background: #fff;
              border: none;
              border-radius: 0;
              margin-bottom: 40px;
              box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
          }
  
          .navbar-btn {
              box-shadow: none;
              outline: none !important;
              border: none;
          }
  
  
          /* ---------------------------------------------------
      SIDEBAR STYLE
  ----------------------------------------------------- */
  
          .wrapper {
              display: flex;
              width: 100%;
              align-items: stretch;
          }
  
          #sidebar {
              min-width: 250px;
              max-width: 250px;
              background: rgb(60, 95, 238);
              color: #fff;
              transition: all 0.3s;
          }
  
          #sidebar.active {
              margin-left: -250px;
          }
  
          #sidebar .sidebar-header {
              padding: 20px;
              background: rgb(90, 121, 243);
          }
  
          #sidebar ul.components {
              padding: 20px 0;
              border-bottom: 1px solid #47748b;
          }
  
          #sidebar ul p {
              color: #fff;
              padding: 10px;
          }
  
          #sidebar ul li a {
              padding: 10px;
              font-size: 1.1em;
              display: block;
          }
  
          #sidebar ul li a:hover {
              color: #7386D5;
              background: #fff;
          }
  
          #sidebar ul li.active&gt;a,
          a[aria-expanded="true"] {
              color: #fff;
              background: #6d7fcc;
          }
  
          a[data-toggle="collapse"] {
              position: relative;
          }
  
          .dropdown-toggle::after {
              display: block;
              position: absolute;
              top: 50%;
              right: 20px;
              transform: translateY(-50%);
          }
  
          ul ul a {
              font-size: 0.9em !important;
              padding-left: 30px !important;
              background: #6d7fcc;
          }
  
          ul.CTAs {
              padding: 20px;
          }
  
          ul.CTAs a {
              text-align: center;
              font-size: 0.9em !important;
              display: block;
              border-radius: 5px;
              margin-bottom: 5px;
          }
  
          a.download {
              background: #fff;
              color: #7386D5;
          }
  
          a.article,
          a.article:hover {
              background: #6d7fcc !important;
              color: #fff !important;
          }
  
          /* ---------------------------------------------------
      CONTENT STYLE
  ----------------------------------------------------- */
  
          #content {
              width: 100%;
              padding: 20px;
              min-height: 100vh;
              transition: all 0.3s;
          }
  
          /* ---------------------------------------------------
      MEDIAQUERIES
  ----------------------------------------------------- */
  
          @media (max-width: 768px) {
              #sidebar {
                  margin-left: -250px;
              }
  
              #sidebar.active {
                  margin-left: 0;
              }
  
              #sidebarCollapse span {
                  display: none;
              }
          }
  
          /* ---------------------------------------------------
      CHART STYLE
  ----------------------------------------------------- 
  
          /* LINE CHART STYLE */
  
          .axis--x path {
              display: none;
          }
  
          .line {
              fill: none;
              stroke: steelblue;
              stroke-width: 1.5px;
          }
      &lt;/style&gt;
  
      &lt;!--lib js--&gt;
  
      &lt;!--bootstrap--&gt;
      &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
          integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
          crossorigin="anonymous"&gt;&lt;/script&gt;
  
      &lt;!--fontawesome js--&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js"&gt;&lt;/script&gt;
  
      &lt;!--d3(chart) js--&gt;
      &lt;script src="https://d3js.org/d3.v5.min.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div class="wrapper"&gt;
          &lt;!-- Sidebar --&gt;
          &lt;nav id="sidebar"&gt;
              &lt;ul class="list-unstyled components"&gt;
                  &lt;li class="active"&gt;
                      &lt;a href="/"&gt;DASHBOARD&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
              &lt;!--End of nav.sidebar--&gt;
          &lt;/nav&gt;
  
          &lt;!--Page content--&gt;
          &lt;div id="content"&gt;
              &lt;!-- navbar --&gt;
              &lt;nav class="navbar navbar-expand-lg navbar-light bg-light"&gt;
                  &lt;div class="container-fluid"&gt;
                      &lt;button type="button" id="sidebarCollapse" class="btn btn-info"&gt;
                          &lt;i class="fas fa-align-justify"&gt;&lt;/i&gt;
                      &lt;/button&gt;
                  &lt;/div&gt;
              &lt;/nav&gt;
  
              &lt;div class="container-fluid content-header"&gt;
                  &lt;form class="form-inline"&gt;
                      &lt;div class="form-row"&gt;
                          
                          &lt;div class="form-group"&gt;
                              &lt;select id="" class="form-control userChoice col-md-16"&gt;
                                  &lt;option value="monthly"&gt;Monthly&lt;/option&gt;
                                  &lt;option value="weekly"&gt;Weekly&lt;/option&gt;
                                  &lt;option value="daily"&gt;Daily&lt;/option&gt;
                              &lt;/select&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
              &lt;!--End of div.row--&gt;
          &lt;/div&gt;
  
  
          &lt;!--End of div.wrapper--&gt;
          &lt;script src="js/script3.js"&gt;&lt;/script&gt;
  
  
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have this ` element but the problem is that it only gets one value. Please see on the console:
  <a href="https://i.stack.imgur.com/x6SGx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x6SGx.png" alt="enter image description here"></a></p>
  
  <p>I've tried getting the value of my dropdown/select element with the help of jquery/javascript
  using the code below:</p>
  
  <pre><code>    $(document).ready(()=&gt;{
      $(".userChoice").on("click",()=&gt;{
          var selectedItem = $(".userChoice").val();
          //console.log(selectedItem)
          if(selectedItem = "monthly"){
              console.log(selectedItem);
          }
          else if(selectedItem = "weekly"){
              console.log(selectedItem);
          }
          else if(selectedItem = "daily"){
              console.log(selectedItem);
          }
      })
  });
  </code></pre>
  
  <p>But it only outputs monthly. Can someone please help me with these?
  The code snippet is below:</p>