L
L
lillianfisher2021-04-24 06:31:14
Vue.js
lillianfisher, 2021-04-24 06:31:14

Ternary operator with one property how?

Hello, the ternary operator is convenient to use in, for example, when processing v-on events, but how can you set only one property to it.
for example, you can use a crutch with

isDropped ? "что либо, к примеру 'true' либо  'myVariable' без присваивания значения" : myVariable = true

But how right is this, are there any better methods

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lavezzi1, 2021-04-24
@lillianfisher

isDropped && "что либо, к примеру 'true'"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question