Prev Demo
JavaScript
>
Variable Declaration
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <h1>Variable declation</h1> <script type="text/javascript"> var firstName; var lastName = "Funda"; myName = "Sheo"; function MyFunction(){ var a = 20; b = 30; } </script> <p><strong>Note:</strong> In left side box, observe the code inside the <script> tag.</p> </body> </html>
Note: We DO NOT save your trial code in our database.
Output