Question
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;
}
Introduction to JavaScript
CS206
// place your code here. //
console.log('Hello, beautiful world!!');
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started