how to make function in react js.with function definition and function call

153 views Asked by At

how to make function in react js .in my below code i try to make function in react js. i want to make in my below code some function in written but i want to make this function is written in react js .

how can we we write this function in react js.

is there any help.its very thankful.

FUNCTION abpswarn(p_row, p_col)

    DEFINE p_row     SMALLINT,
           p_col     SMALLINT

    DEFINE answer    CHAR(1)

    OPEN WINDOW abpswarn AT p_row, p_col WITH FORM "abpswarn"
        ATTRIBUTE
        (
            BORDER,
            YELLOW,
            FORM LINE FIRST,
            COMMENT LINE FIRST,
            MESSAGE LINE FIRST,
            PROMPT LINE LAST
        )

    OPTIONS INPUT NO WRAP

    IF (continue_program(p_row + 10,p_col + 22) != TRUE) THEN
        CLOSE WINDOW abpswarn
        CLEAR SCREEN
        EXIT PROGRAM
    END IF

    CLOSE WINDOW abpswarn

END FUNCTION
2

There are 2 answers

2
Salah Ben Bouzid On

you can not say I need to write this function in react JS js you need to convert or write this function to work on javascript to work in react JS or (edited it as JSX the React js template language) in react Temple Language ), and please provide more pieces of information about this function.

1
Austin Madangwa On

You must be familiar with JavaScript. Try writing the same function in JavaScript and in that way, it's very likely to run on REACT.