homeworkstudyhelp

Our Services

Get 15% Discount on your First Order

  Javascript Program writing Task A   1.1 As a JavaScript…

 

Javascript Program writing

Task A

 

1.1 As a JavaScript  programming student ,I want to establish  code with   a variable `isHappy` and assign it a boolean value based on the value of the given String variable `action`, whether it is `Smile` or not.

 

 1.2 As a JavaScript student,  I want an  illustration showing output of a   code with a variable `favoriteSubjects` and assign it an array of strings representing your favorite subjects. As a student of JavaScript programming

 

 1.3. As a JavaScript student,  I want an  illustration showing output of a  program to compare two numbers, `num1` and `num2`, and check if `num1` is greater than or equal to `num2`. 

 

1.4. As a student of JavaScript programming  I am required to outline a program to calculate the square of a given number, `num`.

 

1.5. . As a student of JavaScript programming  I am required to outline the output of a program to check if a given number, `num`, is even or odd.

 

 1.6. As a student of JavaScript programming  I want to outline the output of  a code to check if a given year, `year`, is a leap year and divisible by 400 or divisible by 4 but not divisible by 100. 

 

1.7. As a student of JavaScript programming  I want to obtain a program that checks if a given character, `char`, is a vowel or a consonant. 

 

1.8. As a student of JavaScript programming  I want to outline a program that determines the largest among three numbers, `num1`, `num2`, and `num3`. 

 

1.9. As a Javascript  programmimg student, I want to generate a  program that determines the sign of a given number, `num` (positive, negative, or zero), using the ternary operator. 

 

1.10. As a Javascript  programmimg student, I want to generate a  code that determines the grade based on a given percentage, `percentage`. Use the following grading scale: A (90-100), B (80-89), C (70-79), D (60-69), F (0-59).

 

 

Task B

2.1 As a Javascript  programming student, I want to generate a program that determines the type of triangle based on the lengths of its sides (`side1`, `side2`, and `side3`). The types of triangles are equilateral, isosceles, and scalene.

 

 2.2. As a Javascript  programming student, I want to generate a JavaScript program that counts the number of occurrences of a specific element in an array using a for…of loop. 

 

2.3. As a Javascript  programming student, I want to generate a function that takes an array of product prices and returns the total price. You can assume that the array contains only numbers.

 

2.4 As a Javascript  programming student, I want to generate a function that takes an array of product prices and a discount percentage. Apply the discount to each product price and return the updated prices as an array.

 

 2.5. As a Javascript  programming student, I want to generate  a function that takes an array of product quantities and returns an array of indices for products that are out of stock (quantity is 0)

 

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Retail Price Calculator using C#   Create an application that lets…

Retail Price Calculator using C#   Create an application that lets the user enter an item’s wholesale cost and its markup percentage. It should then display the items retail price. For example: If an item’s wholesale cost is $5.00 and its markup percentage is 100 percent, then the item’s retail

CSC521 Programming Project 3 A Stack-based Calculator With Postfix…

CSC521 Programming Project 3 A Stack-based Calculator With Postfix Expression Using Java Purpose • To make a simple integer calculator for 8-bit signed numbers (i.e. accept 12*4*(5-3) = and produce an answer). • To see how the stack can be used to support arithmetic operations. • Note: Groups of at

/* * Part 1: Light * A class which represents a single light bulb….

/** Part 1: Light* A class which represents a single light bulb.For this assignment, you will be writing a class called Light that represents asingle light bulb.Your job is to add code to Light.java so that your implementation meets therequirements specified below.To complete the assignment, replace all the /* missing

import java.util.Arrays; import java.util.Random; public class…

import java.util.Arrays; import java.util.Random; public class Board { private boolean[][] board /** * Construct a puzzle board by beginning with a solved board and then * making a number of random moves. That some of the possible moves * don’t actually change what the board looks like. * * @param

Implement the  programs in ARM assembly. implement them first in…

Implement the  programs in ARM assembly. implement them first in JAVA and translate the logic into assembly Implement a program to calculate multiplication using successive addition with recursion. For example, 5×4 is 5+5+5+5.  This can be defined recursively as:             Mult(m, n) = if n is 1,  return m                               

file named A10.java. Place all your code in this file. Create…

file named A10.java. Place all your code in this file. Create public static ArrayList of integers named intList. Define public static method addNumber (int i) that adds i to your list. Create public static HashMap of integer, integers named int Map. Define public static method add Pair (int i, int

Traversing 2D Arrays Traditional For Loop assignment 1 When…

Traversing 2D Arrays Traditional For Loop assignment 1 When traversing a 2D array a nested loop is required. The first or outside For loop will traverse the rows and the second or inside For loop will traverse the columns.     We say “for every row, for every column of

3.1.2 – Using nslookup for Passive Reconnaissance What is NSLookup?…

3.1.2 – Using nslookup for Passive Reconnaissance What is NSLookup? Try to do NSLookup on a different website and record your answer. How is Nslookup beneficial? Which part of the ethical hacking methodology does this relate to? 3.1.3 – Using ipconfig for passive reconnaissance What is ipconfig used for? After

Help me with Java   MovieStack Your are tired of asking your…

Help me with Java   MovieStack Your are tired of asking your “friend” to watch the movies you like. So you want to give your friend a stack of movies to watch, representing a watchlist. Let’s automate this process by creating a new data structure class called MovieStack, which should

Question 1: The difference between head and tail recursion? Does…

Question 1: The difference between head and tail recursion? Does JAVA support it? What are the advantages and disadvantages of each?Question 2: Describe, in detail, what are the “Traversal of Binary Trees” (hint: In-order Traversal, Pre-order Traversal, Post-order Traversal):

I need help writing a Java class StringSet .  A StringSet object…

I need help writing a Java class StringSet.  A StringSet object is given a series of up to 15 String objects.  It stores these Strings (or a reference to them, to be precise) and can perform limited calculations on the entire series.   The StringSet class has the following specification:

What is the purpose of comments and whitespaces in Java? What are…

What is the purpose of comments and whitespaces in Java? What are the Java statements and logic necessary to produce a Java program that correctly prompts users to enter a username and password? Consider that the username is not case-sensitive, but the password is. The user needs to correctly type