Web Technology
primer-original-v2mediumWeb TechnologyJavascriptprimer-original-v2

Ram's banking website has a 'Check Interest Rates' button that should redirect users to a separate page. Which JavaScript code accomplishes this?

Answer options

A
location.href = "url"
B
url.newlocation
C
window.redirect("url")
D
document.location("url")

Correct answer: location.href = "url"

Detailed Solution & Conceptual Analysis

This question has been retained as-is due to its unique context.

Key Engineering Takeaway

In Web Technology, understanding the underlying mechanics of Web Technology is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.

Related Web Technology questions

Practice more Web Technology questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.