I want to make array elements one as javascript

Asked

Viewed 23 times

-1

With this part of the code, I was able to take the value related to day, month and year, however value came as an element of the array, I want to know a way to join these elements of the array making a single element.

Value I expect: dd/mm/yyyy

inserir a descrição da imagem aqui

  • 2

    It wouldn’t be enough to do var dataVerificacao = \${dia}/${mes}/${yearAtual}``?

  • 1

    If you want to format the date, you can just dataAtual.toLocaleDateString('pt-BR') (or choose some of the link options indicated above in the blue box). To concatenate values in general, use the suggested method in the comment above - see more details about this syntax here

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.