Answered step by step
Verified Expert Solution
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
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.4Step 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