1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

using Prompt to add a value to function

Discussão em 'Angular' iniciado por Arekhamhe, Julho 18, 2025.

  1. Arekhamhe

    Arekhamhe Guest

    function add (digit){
    var figure = digit * 1.5;

    console.log("Answer is " + figure);
    }

    add() = parseInt(prompt(''));


    I need help from someone I want to use the prompt to add a value to the add function parameter

    I was expecting the prompt will pop up an input dialogue box in which I will input a value that will be placed in the add() function.

    Continue reading...

Compartilhe esta Página