Open in app
Home
Notifications
Lists
Stories

Write
Tauan Tathiell
Tauan Tathiell

Home

Nov 27, 2019

Substituindo sua instrução switch e múltiplos “if e else”, usando Object Literals.

Antes de tudo, o que é uma instrução switch? como se usa? Um switch é uma função que recebe dados, e esses dados serão analisados; se esses dados forem iguais a um de nossos cases, ele executa a instrução que está inserida no bloco de código e retorna um valor.

Java Script

3 min read

Substituindo sua instrução switch e múltiplos “if e else”, usando Object Literals.
Substituindo sua instrução switch e múltiplos “if e else”, usando Object Literals.

Nov 27, 2019

Replace your switch statement and multiple “if and else”, using Object Literals — [en-US].

So First, What is Switch Statement? A switch is a function that receives data, and that data will be analyzed, if this data is equal to one of our cases, it makes the instructions in that case and returns a value.

Java Script

3 min read

Replace your switch statement and multiple “if and else”, using Object Literals — [en-US].
Replace your switch statement and multiple “if and else”, using Object Literals — [en-US].
Tauan Tathiell

Tauan Tathiell

Front End Developer at XP Inc

Following
  • Charles Stover

    Charles Stover

  • Vinicius Brasil

    Vinicius Brasil

  • Adam Carrigan

    Adam Carrigan

  • Alan B Smith

    Alan B Smith

  • Ryan Florence

    Ryan Florence

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable