I
I
Ivan Stetsenko2018-09-04 14:47:04
JavaScript
Ivan Stetsenko, 2018-09-04 14:47:04

How to get an object from a function?

There is a function that, through prompt, asks the user for data, simultaneously writing them to the object. The function itself is called by clicking on the button. Question: is it possible to pull out a ready object without calling a function separately from addEventListener;
The code itself

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex_Zdorgor, 2018-09-04
@Clark88

An example of a code and a task to be solved is desirable.
If you almost blindly give an answer, then you can make an object outside the function. This will make it possible to get the last data written to the object, without calling a function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question