Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Having trouble with these questions, help and explanation would be much appreciated! Question 4 Write a function named getName that accepts two parameters in this

image text in transcribedimage text in transcribed

Having trouble with these questions, help and explanation would be much appreciated!

Question 4 Write a function named getName that accepts two parameters in this order: first and last. The function should concatenate the parameters (with a space between the names) into a new variable (using a template literal string) called name, and return that variable. function getName(first, last) { let name = ${first} ${last} ; return name; } Feedback Incorrect Try again. Question 5 Based on the code below, what is the value of total? function getTotal (subtotal, sales_tax, shipping) { var service_fee = .15; var tax = subtotal * sales_tax; var total = subtotal + tax + shipping; var fee = total * service_fee; total = total + fee; return total; } var total = '$' + getTotal(21, .6, 8); $22.4

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago