JavaScript on the web lives inside the HTML document.
In HTML, JavaScript code must be inserted between <script> and
</script> tags:JavaScript can be placed in HTML pages <body> and <head>
sections. For exampleTo send a alert message to device start code with alert. Then add this ("")
In between those put in any message you want. For exampleThis would be the result:
For the message to be on the website add in document.write("") and just like before, put your message between the ("") for example:The document.write() function writes a string into our HTML document. This function can be used to write text, HTML, or both.
The above code displays the following result:
The above code displays the following result:
Just like in HTML, we can use HTML tags to format text in JavaScript.
For example, we can output the text as a heading.Result:
Ok I'm not done yet I'm still learning but eventually it will get filled up. Give me any tips with JavaScript if you can😁
YOU ARE READING
JavaScript notebook
RandomThis is just a notebook about the codes I'm learning. But if you like you can read it to😁