Posts by Diego Oliveira • 119 points
7 posts
-
2
votes1
answer209
viewsQ: When calling an asynchronous function, is it also necessary to note the calling function as "async"?
I have a question about asynchronous functions. I have the following function in my file models: const login = async (email, password) => { código qualquer aqui... }; And now I need to call this…
-
2
votes1
answer345
viewsQ: Nodejs - Async await with Mongoose
I am creating an API with nodejs and Mongoose, I am trying to create a user using async await, but I did not succeed, whenever I send the data they are not saved, I already checked the entire…
-
-1
votes1
answer42
viewsQ: Nodejs - pass a function in the format of Privileges to async await
I have the code of an application made a while ago, but it was made using Promises, then/catch, I’m trying to familiarize myself with async await but I’m having difficulties,I would like to see how…
-
0
votes1
answer66
viewsQ: Javascript - How to create two-dimensional arrays and loop them?
For example, if I want to create an algorithm with 3 lines and 4 columns, in which each row is a student, and each column is the student’s grades (1st bimonth, 2nd bimonth, 3rd bimonth, 4th…
javascriptasked Diego Oliveira 119 -
0
votes1
answer228
viewsQ: Javascript - Calculation of school grades with object use, is it possible?
My intention is to make the famous algorithm of school grades to calculate the average student, which is usually done with arrays, but I want to know if it is also possible with use of objects, my…
javascriptasked Diego Oliveira 119 -
0
votes1
answer104
viewsQ: Nodejs - Make an algorithm that reads the height and enrollment of ten students. Show the enrollment of the highest student and the lowest student
All I can do is show the height from the smallest to the largest, but I want to show you which license plates the heights belong to (undergraduate enrollment, higher student enrollment, etc) const…
-
5
votes2
answers769
viewsQ: How to return values with numbers in an array
I’m trying to perform a school grade calculation with Javascript but the result returns me NaN. Code: array_notas = [10, 9, 8, 7] function calcularMedia(param) { for (let i = 0; i <= 4; i++) {…