Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

body { height: 98vh; font: 16px Verdana; display: flex; align-items: center; justify-content: center; background: linear-gradient(to top left, #289fb4, #6fa7d5); } h1 { display:block; font-family: sans-serif;

body {

height: 98vh;

font: 16px Verdana;

display: flex;

align-items: center;

justify-content: center;

background: linear-gradient(to top left, #289fb4, #6fa7d5);

}

h1 {

display:block;

font-family: sans-serif;

font-size: 60px;

line-height: 1.3;

width: 100%;

text-align: center;

padding: 30px;

color: white;

}

My JavaScript File

Introduction to JavaScript

CS206

Download the zipped assignment starter file Download zipped assignment starter file.

Extract to your working folder for this class.

Follow the written instructions provided below.

Using the code examples below, convert each to a ternary operator statement:

const arg1 = 6>5<7; const arg2 = 9<5>7;

if(arg1) { console.log(`${arg1} is true); } else { console.log(`${arg1} is false); }

if(arg2) { console.log(`${arg2} is true); } else { console.log(`${arg2} is false); }

The following exercise will create functions that accept two numbers as parameters and return the sum of the two numbers.

Create a function declaration that accepts two numbers and returns the sum.

Create a function expression that does the same.

Create an arrow function that does the same.

Call the function declaration before it is declared.

Call the expression and arrow function after they are declared.

Log each result to the console.

Create a mixed array that includes a variable, a string, a number, and an array (by name only). Write a loop that will display each item in the array in the console along with its data type.

Comment each segment of your code explaining what each major construct is designed to do.

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

6.3 Explain the importance of application forms.

Answered: 1 week ago

Question

How will the members be held accountable?

Answered: 1 week ago

Question

a. How will the leader be selected?

Answered: 1 week ago