• Cursos
  • Compilador de Código
  • Discutir
  • Preços
  • Teams
Menu
+ 1

Javascript variable

How do I calculate an input value? If perhaps the user enters “2+2+2” how do I output the result?

javascriptcodingcalculate
6th Jul 2019, 3:16 PM
Enahoro Godwin
Enahoro Godwin - avatar
1 Resposta
+ 2
check this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval
6th Jul 2019, 3:45 PM
MO ELomari
MO ELomari - avatar

Costuma ter perguntas como essa?

Aprenda de maneira mais eficiente, de graça:

  • Introdução ao Python

    7.1M de alunos

  • Introdução ao Java

    4.7M de alunos

  • Introdução ao C

    1.5M alunos

  • Introdução ao HTML

    7.5M alunos

Ver todos os cursos
Quente hoje
Ошибка в приложении Sololearn
1 Votes
Is anyone else experiencing this Sololearn issue?
0 Votes
NEO V2.0
1 Votes
Best language?
0 Votes
solo learn program issue - iPhone?
1 Votes
How do I keep myself motivated in coding
0 Votes
Is it possible to write Rust code that is as compact and expressive as Python?
0 Votes
you con help mi
1 Votes
Learn - multiple choice course questions display in one box making it impossible to continue
1 Votes
Sql practice
0 Votes