Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

do 1-4 please SUBMISSION INSTRUCTIONS: This document lists different programming exercises in JaviScript ina HTML cade is required). For this particular task, it is important

image text in transcribed

do 1-4 please

SUBMISSION INSTRUCTIONS: This document lists different programming exercises in JaviScript ina HTML cade is required). For this particular task, it is important to attach the souree code of each exerrise in a zipged folder. This folder must be submitted on iCallege under "Hemework 3". Each exercise must have its own JavaScript file with the following name "ris_nfirstname:liastriame.js". For cxample, the fileniame for the third exerrise wald be "is_3_john_dor.js" ADDITIONAL INSTRUCTIONS: For each exerrise, you will need to prowide comments explaining your lavascript cade. It ather werds, you reed to describe the functionality of yaur cade in every relevant part (declaration, functions, lopps, pperations, autput). Short explanations in your code are not allowed. NOTE: To add comments in a S code pou noed to use the "// for single line cornments ard "/ carnment goes here "/" for multiple line comments. 1. (15 points) Lsing the Date(0) object, write a IS program to display the current day and time in the fellerwing format (must he risplayed in the console!). Far example: Today is: Friday Current time is: 5:00:00 PM 2. [15 points) Using the [ated] objoct, write a IS program to calculate the days, hours, minutes, and seconds left until next year [must be displayed in the conscle), For example: 309 duys, 15 hours, 5 minutes, 40 seconds left until hext year. 3. (15 points) Create a function in Is to determine whether a number is a palindrome (the function must retum true, otherwise false). Test yaur function using the consale.logi! function. Far example: 1441 must return true. 4. [20 points] In Javascript create a function that computes the prime factors of a given natural number. The function must return a list of prime factors and it must have the natural number as a parameter]. For example, the prime factors of 60 is 2235

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions