Check if div-container has more than one div-inner no jQuery

Check if div-container has more than one div-inner no jQuery

I need a&nbsp;<code style="background-color: rgb(239, 240, 241);">if</code>&nbsp;<code style="background-color: rgb(239, 240, 241);">else</code>&nbsp;function that checks if&nbsp;<code style="background-color: rgb(239, 240, 241);">div_container</code>&nbsp;has more than one&nbsp;<code style="background-color: rgb(239, 240, 241);">div_inner</code>&nbsp;inside of it with Javascript only.

I need a if else function that checks if div_container has more than one div_inner inside of it with Javascript only.

Here's my example code:

var inner = document.querySelector('.inner')
var container = document.querySelector('.container').innerHTML;
if(container > '1') {
  container.classList.add('test');
}
else {
  // do nothing
}
.test {
  color: red;
}
<div class="container">
  <div class="inner">Test</div>
</div>

<div class="container"> <div class="inner">Test</div> <div class="inner">Test</div> </div>


I only want to use Javascript. No jQuery at all.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Understand and Use JavaScript's .forEach() vs. jQuery's .each()

There are two functions to deal with an array on the client-side – JavaScript's .forEach() and jQuery's .each(). Here, I will teach you how to use both of these methods with some sample code.

jQuery vs Vanilla JavaScript - Beau teaches JavaScript

When should you use jQuery instead of vanilla JavaScript? Is jQuery still relevant? What is jQuery good for? jQuery vs vanilla JavaScript - Beau teaches JavaScript

3 JavaScript libraries to replace jQuery

Ubiquitous jQuery has been outmoded by JavaScript and browser advances. Cash, Zepto, and Syncfusion are three JavaScript libraries picking up where jQuery left off