Assignment 6, Ques.1

Please explain me the solution of Assignment 6, Ques.1 in detail.

Write a JavaScript program that gets the first name from the user and print on a label having ID “firstname”.