Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

take two inputs from user and add them using callback function

const add = (input1, input2) =>{
    console.log(input1+input2);
    return input1+input2;
}
const inp = (abc) =>{
    let a = parseInt(prompt("Enter first number"));
    let b = parseInt(prompt("Enter second number"));
    inp1 =Number(a);
    inp2 =Number(b);
    return abc(inp1,inp2);
}
alert(inp(add));
Comment

PREVIOUS NEXT
Code Example
Typescript :: nextjs waiting for compiling problem 
Typescript :: stats normal 
Typescript :: From the three types of styling, which one is the most useful in terms of website optimization? 
Typescript :: js convert to typescript online 
Typescript :: google sheets how to make a list of unique words in a cell 
Typescript :: error on indexing the object in ts 
Typescript :: DISTINQUISH BETWEEN THE AVERAGE CASE AND WORSE CASE RUNNING TIME AND THE FACTORS AFFECTING THAT AFFECTS THE RUNNING TIME OF AN ALGORITHM 
Typescript :: how to send attachments to api 
Typescript :: @ViewChild takes 2 arguments error 
Typescript :: deno allow net 
Typescript :: when new item added in array its not refreshing the list in ember 
Typescript :: woocommerce remove This is where you can add new products to your store in taxonomy description 
Typescript :: linear regression predicts negative values with positive training examples 
Typescript :: Powershell show inactive account in active directory 
Typescript :: check if an element exists laravel 
Typescript :: webintent plugin cordova 
Typescript :: nativescript display image from web 
Typescript :: Copy the first two array elements to the last two array elements 
Typescript :: optional or required depending on param is true react typescript 
Typescript :: react conditional classname typescript 
Typescript :: create seperate file for requests react 
Typescript :: can check constraints reference other tables 
Typescript :: wifi disconnects frequently when downloading 
Typescript :: how to populate array in typescript 
Typescript :: react array props typescript type 
Typescript :: 4. In order to have proper integration of the pulse current it is desired that 
Typescript :: TypeError: agent_go() takes 0 positional arguments but 1 was given 
Typescript :: fiber absorption loss measurement 
Typescript :: how to register a static assets folder spring boot 
Typescript :: importhtml google sheets multiple tables 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =