Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new html page to write the following JavaScript exercises. Variables Declare variables (they can choose the names) that when console logged will give

Create a new html page to write the following JavaScript exercises.

Variables

Declare variables (they can choose the names) that when console logged will give you the following results:

10

23.5

true

apple

null

undefined

Declare variables x and y and assign values of numbers. Use these variables to console log an addition, subtraction, division and multiplication.

Declare a variable called i and set it equal to 0. Increment by one using abbreviated syntax.

Declare a variable called i and set it equal to 0. Decrement by one using abbreviated syntax.

Declare variables called name and lastName and concatenate to give your full name.

Concatenate the message : "My name is " to the variables name and lastName.

Console log 10%2 and use a comment to explain the result

Console log 9%2 and use a comment to explain the result

Functions

Create a function called thishalf that takes a parameter and multiplies this parameter by .5 Call this function with the value of 10.

Create a function that takes a parameter and increments this value by one. Cal this function with the value of 0.

Create function that takes a string and uses this parameter to console logThe current string is "parameter". Use single and double quotes to achieve this. Call this function with the value of "go".

Create a function that takes no parameters and returns the string The man/woman is "coding".

Create a function that takes 3 parameters. It should return the subtraction of all three. Call this function with the values of 20,10,3.

Create a function that takes 4 parameters. It should return the value of the sum of the first 3 divided by the last. Call this function with the values of 2,2,5,3.

Create a function that takes a parameter. Use this parameter to call the thishalf function inside your function and return the string value"is the half of " and the parameter. Call this function with the value of 20. The result should be "10 is the half of 20".

Create a function called test that takes a parameter. Use this parameter to compare if it this parameter is true or false. If it is true you should return the string "This is true", otherwise it shouldreturn the string "It is false".

Create a function called isTen that takes a parameter. Use this parameter to compare if it this parameter is equal to the value of 10. If it is true you should return the string"Equal to", otherwise it should return the string "Not equal".

Create a function called inRange that takes a parameter. Use this parameter to compare if it this parameter is between the values 3 and 20. If it is true you should return the string "In range", otherwise it should return the string "Not in range".

Profile Page

Create a profile page for yourself. Should have at least the following information:

Name

Last Name

Picture

Link to your email

Ordered list of 3 hobbies

List of favorite foods (unordered).

Checkbox for user to like your profile.

Make sure they use the following CSS/HTML features:

h1,h2, p elements

Different colors and fonts for text (use classes and ids)

Image

lists

checkbox

nested divs

Use the current profile page and create a button called change profile

The button should invoke a function that changes the name, lastName of the current profile page to "John Smith". Also change the image to a different one.

Use the append() and prepend() to add NEW elements that contain a License number and a Date.

Use JQuery to create a new profile using text(), html() and append().

Same Address

Create new HTML page with two forms:

Shipping Address - Name, Address Line 1 , City, State, ZIP

Billing Address - Name, Address Line 1 , City, State, ZIP

Add two buttons:

Copy Shipping Address to Billing

Clear All

Make both buttons functional

Float both forms side to side using Bootstrap.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions