Question

var a = 2 In the code above describe what does each of the five part...

var a = 2

In the code above describe what does each of the five part perpresents. (var, a, = , 1, ;)

0 0
Add a comment Improve this question Transcribed image text
Answer #1
  1. var : keyword to declare the variables
  2. a : it is name for the variable
  3. = : assignment operator
  4. 2 : constant integer value
  5. ; : end of the statement

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
var a = 2 In the code above describe what does each of the five part...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Describe what each code snippet does and how it might be used in Statics. Describe in...

    Describe what each code snippet does and how it might be used in Statics. Describe in general terms what Statics calculation is being performed by each code snippet. What is input to the calculation and what results are given? Give definitions not numbers. Hint: all arrays are components of vectors [ x, y, z ]. Code 1 V1 = [ 0, 1, 2 ]; V2 = [ 3, -4, 5 ]; x = 1; y = 2; z = 3;...

  • #Practical Quiz 3 #Add a comment above each line of code describing what it does. #Be...

    #Practical Quiz 3 #Add a comment above each line of code describing what it does. #Be specific. Use multiple comment lines if you need to #OR write code below the comments requesting code. #Make sure your file runs and generates the correct results. def main(): #define variable str1 with string "Hello" str1 = "Hello" #print out the 2nd letter print(str1[1]) #START QUIZ HERE print(str1[-2]) print(str1[:3]) print(str1[2:len(str1)-1]) str2 = "World" print(str1+str2) #write code below to iterate over the str1 and print...

  • MatLab Engineering Describe what each code snippet does and how it might be used in Statics. Describe in general terms w...

    MatLab Engineering Describe what each code snippet does and how it might be used in Statics. Describe in general terms what Statics calculation is being performed by each code snippet. What is input to the calculation and what results are given? Give definitions not numbers. All of these involve some concept covered in this module. Code 1 Magnitude = 5; Angle = 210; X = Magnitude * cosd( Angle ) Y = Magnitude * sind( Angle ) Code 2 Xcomponents...

  • 1. import sys → What does this line of code do? 2. sys.getsizeof(object) → what does...

    1. import sys → What does this line of code do? 2. sys.getsizeof(object) → what does the following method do? 3. Place python source code in your shell and test. data = 10 sys.getsizeof(data) data = 100000 sys.getsizeof(data) data = 100000000 sys.getsizeof(data) what happens when you run the above code?              data = 10.0 sys.getsizeof(data) data = 100000.5 sys.getsizeof(data) data = 100000000.5 what happens when you run the above code? 4. Please describe the why floats and doubles in Python or...

  • 2. Desk check this code. var sum = 0; for (var i=1; i <=3; i++) if...

    2. Desk check this code. var sum = 0; for (var i=1; i <=3; i++) if ((i % 2) 0) { sum += i; else sum-= 1; Desk Check i % 2 sum

  • Given the following JavaScript code, what will be displayed on the web page? var k=1; var...

    Given the following JavaScript code, what will be displayed on the web page? var k=1; var m=0; var p=0; while (k<=4) {      k++;      for (p=1; p<=4; p++)      {            document.write(p +" ");      }      document.write("<br>"); }

  • What is the output of the below code? var color = "yellow"; var colorObject = {...

    What is the output of the below code? var color = "yellow"; var colorObject = { color: "blue", check: function() { return this.color } }; console.log(colorObject.color); ( ) Undefined ( ) green ( ) blue ( ) yellow OBS: If it is possible to explain the reason for the choice(s) and why the other options are incorrect I would be grateful

  • 1. (a) Describe five transformations a pre-processor would typically apply to source code. 5 marks) (b) Describe fi...

    1. (a) Describe five transformations a pre-processor would typically apply to source code. 5 marks) (b) Describe five different ways in which the programmer can be notified of compiler errors in source code. 5 marks) (c) Describe five typical steps in the linking of libraries into a programmer's source code and executable binary (5 marks (d) Describe five ways of notifying run-time errors for the programn or end user to handle (5 m 1. (a) Describe five transformations a pre-processor...

  • Given the following JavaScript code, what will be displayed on the web page? var pho =...

    Given the following JavaScript code, what will be displayed on the web page? var pho = new Array(); for (var i = 0; i< 7; i++) {      pho[i] = (i*i) + 3; }            for (var i = 0; i< 7; i++) {      document.write(i + " => " + pho[i] + "<br>"); } 1 => 4 2 => 7 3 => 12 4 => 19 5 => 28 6 => 39

  • What is the problem with this code? <html> <body> <script type="text/javascript"> //Declare variables var numStudents; var...

    What is the problem with this code? <html> <body> <script type="text/javascript"> //Declare variables var numStudents; var index; var sName; var ES = ""; var BR = "<br />"; var PA = "<p />"; //Print statement document.write("Student Name Entry Program" + PA); //Prompt for number of students to add numStudents = prompt("Enter the number of student names to add: "+ ES); //Loop through numStudents of times, prompting for student names for(index = 1; index <= numStudents: index++) { sName = prompt("Enter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT