Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 . Create a variable called phone and assign the value 8 8 8 - 1 2 3 - 1 2 3 4 . Using
Create a variable called phone and assign the value Using the substring function, output the area code the st characters
Use the substr function to return the phone number without the area code for the variable phone used in problem For example, output
Create a variable called sentence with the text 'I love flavor ice cream! Using the replace function, replace the text 'flavor' with your favorite flavor.
Create variables called addr Main St city'Cleveland', stateOh and zip code Output the address in all uppercase letters as it would appear on the front of an envelope newlines commas, etc Use the appropriate function to convert the strings to uppercase letters.
Create a variable called helpdesk and assign a value of 'HelpDesk@TriCedu'. Use a string function to convert it to all lowercase letters and output the value.
Create a variable called id with a value of Use padStart to output the value with characters total.
Create variables for firstName and lastName. Assign your name to the variables. Use template literals to output 'Hello firstName lastName! Template literals can be found in the JS String Templates" tutorial.
Create a variable called joke with the following string: 'Why don't programmers like nature? It has too many bugs. Define the value on multiple lines using backtics syntax.
Write an expression that returns true from a call to isNaN Display the output returned from isNaN
Use toFixed to output the results of formatted like currency decimal places with dollars and cents.
Use parseInt to output the whole number value for
Use an appropriate function call to check to see if is an integer.
Explain why the following call returns a value of undefined.
MAXLENGTH of x undefined
Create a Date object called d and assign the current date and time using new Date output the value of d
Subtract year from d and output the value.
Output the toUTCString value of d
Output only the year from d
Output a short date with a format similar to using d
Output the day of the week using d and getDay
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