1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
victus00 [196]
3 years ago
10

How to create json object from variables javascript

Computers and Technology
1 answer:
tino4ka555 [31]3 years ago
8 0
Not entirely sure what you want to achieve, but consider this program:

var a = 'foo';
var b = 'bar';

var c = { first : a, second : b };

console.log(JSON.stringify(c, null, 4));

A json object c is constructed using the values from variables a and b. Is this what you mean?
You might be interested in
Software, also called a(n) ____________________, consists of a series of related instructions, organized for a common purpose, t
Naddika [18.5K]
Software is also called a program or an application.
8 0
3 years ago
Why is it important to follow a consistent naming convention for variables?
Vitek1552 [10]

Answer:

today I am going to be out for the job interview so if I will make it happen I am going to New Orleans this week to get the kids to work on the spot and I can get ready to go out to dinner and I can make a few more people

4 0
2 years ago
a solid state drive is a removable flash memory device that you insert and remove from a slot in a computer, mobile device, or c
yulyashka [42]
It is true, Because all the the drives or memories which doesn't have a plates spinning like hard disk are called solid state drives.
4 0
3 years ago
For an activity with more than one immediate predecessor activity, which of the following is used to compute its earliest finish
laila [671]

Answer:

The correct option is A

Explanation:

In project management, earliest finish time for activity A refers to the earliest start time for succeeding activities such as B and C to start.

Assume that activities A and B comes before C, the earliest finish time for C can be arrived at by computing the earliest start-finish (critical path) of the activity with the largest EF.

That is, if two activities (A and B) come before activity C, one can estimate how long it's going to take to complete activity C if ones knows how long activity B will take (being the activity with the largest earliest finish time).

Cheers!

7 0
3 years ago
Write a program that asks the user for several days' temperatures and computes the average temperature for that period and how m
elena-14-01-66 [18.8K]

Answer:

#section 1

<em>no_of_days= int(input('How many days are we geting the average for: ')) </em>

<em>tem=[] </em>

<em>for i in range(no_of_days): </em>

<em>    a= int(input('Enter temperaure: input ' + str(i+1)+'  :')) </em>

<em>    tem.append(a) </em>

<em />

#section 2<em>     </em>

<em>average = round(sum(tem)/len(tem),2) </em>

<em>print('The Average is ',average) </em>

<em>gdays=[] </em>

<em>for i in tem: </em>

<em>    if i > average: </em>

<em>        gdays.append(i) </em>

<em> </em>

<em>print('The following days are greater than the average: ',gdays)</em>

Explanation:

The above code is written in python 3

#section 1:

An input is gotten for number of days that is to be used in the calculation, and an array is created to hold the temperature that will be inputted into the program.

A range of values from [0 - (no_of_days - 1)] is created from the number of days entered, this is done so that the FOR loop can iterate through every number and call for inputs.

The FOR loop prompts the user for an input based on the range and passes that input to an integer data type before appending it to the tem array.

#section 2:

The sum of the new list and the length is used to calculate the average and the it is rounded up to 2 DP, The average is then printed to the screen.

Another FOR loop is used to check which of the days are greater than the average and passes it to another array (<em>gdays)</em>, this array is also printed to the screen.

check the attachment to see how the code works.

4 0
3 years ago
Other questions:
  • Which group of commands all appear on the Standard toolbar?
    9·2 answers
  • To save a file in word, you can select File, Save (save as), select the location, type the file name, and select save. What is t
    7·1 answer
  • harry is analyzing inbound network traffic and notices a tcp packet that has the FIN,PSH, and URG flags set at the same time. wh
    8·1 answer
  • Name the contributions of Steve Jobs and Bill Gates, with respect to technology.
    5·1 answer
  • A ________ is a very large general-purpose computer that is capable of performing very many functions as if these are done simul
    8·1 answer
  • A look to different section of the same page is known as_____.
    7·1 answer
  • If your internet were to go out, what steps would you take to troubleshoot to restore your service?
    15·1 answer
  • Please help on both of these questions will give brainliest<br> !!
    9·2 answers
  • In Outlook 2016, the Tell Me function can be accessed by
    15·2 answers
  • This is an image of the ...........................Topology.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!