WhatisJavaScript?
A definition and an example
Thelanguagetomakewebpagesintelligent
Usecases
• Storingvaluesinsidevariables
• Creatinganimations
• Displayingdynamiccontent
• Reactingtocertaineventsoccurringonawebpage
Asimpleexample
Gotothispage
Asimpleexample
Clickonthetext,apromptisdisplayed
Asimpleexample
EntersometextandclickOK
Asimpleexample
Thetextonthepagewasupdated!
How?
JavaScripthandledthesesteps
1. Whentheuserclicksonthetext,displayapromptwiththeinstructions
"Enteranewname"
2. WhentheuserclicksOKinjecttheirinputintheinitialtext