JavaScript Javascript ? operator: how to pass multiple parameters javascript pass operator as parameter,javascript pass operator to function,

EDIT: I have to make this work on IE11

I have the following code:

span.classList.add(span.textContent === '\ ' ? 'char' : 'spaceChar')

It is working fine, but I would like to add 2 classes in case it's true, something like this:

span.classList.add(span.textContent === '\ ' ? 'char','animated' : 'spaceChar')

I tried using brackets but had no luck:

span.classList.add(span.textContent === '\ ' ? ('char','animated') : ('spaceChar'))

Is there any way to achieve this? Thanks

Answer:1

I am facing problem to format the output as days/mon/years i.e ( 25/08/2019) when I add 5 days with the current date in momentjs. console.log( moment().add(5, 'days').calendar()); Output: Sunday ...

I am facing problem to format the output as days/mon/years i.e ( 25/08/2019) when I add 5 days with the current date in momentjs. console.log( moment().add(5, 'days').calendar()); Output: Sunday ...

  1. days current affairs
  2. days(current date) in db2
  3. days current cast
  4. days(current date)
  5. days(current timestamp)
  6. days current year
  7. how to calculate days with current date in excel
  8. how to add days with current date in java
  9. how to add days with current date in php
  10. how to add days with current date in jquery

In the JavaScript chaijs testing library it is possible to chain members like this: pm.expect (entry.NAME).to.be.a('string').that.is.not.empty; This question is not about the testing library, but ...

In the JavaScript chaijs testing library it is possible to chain members like this: pm.expect (entry.NAME).to.be.a('string').that.is.not.empty; This question is not about the testing library, but ...

<mat-option class="select-bank-option mat-option ng-star-inserted mat-selected mat-active" role="option" data-cy="selectDKCAD" tabindex="0" id="mat-option-261" aria-disabled="false" aria-selected="...

<mat-option class="select-bank-option mat-option ng-star-inserted mat-selected mat-active" role="option" data-cy="selectDKCAD" tabindex="0" id="mat-option-261" aria-disabled="false" aria-selected="...

I'm stuck on a template/component problem and I couldn't find any answer. I'm trying to move a plain Javascript project to Angular2. In my project, I actually create some elements by inherit from ...

I'm stuck on a template/component problem and I couldn't find any answer. I'm trying to move a plain Javascript project to Angular2. In my project, I actually create some elements by inherit from ...

  1. styled components nested elements
  2. styled-components nested elements