Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript What is JavaScript?

Malcolm

Administrator
Administrator
Staff Team
Code Plus
Company Plus
What is JavaScript?
JavaScript is exactly what the name says; it’s a script that controls the behaviour of a website. It helps make your website more interactable and there is no need for any special IDE platforms, you can create it using a regular text editor. In this thread, you will be given a quick understanding on how JavaScript works with HTML+CSS, add JavaScript (JS) within your HTML document, and how to link it externally to a .JS file.

How does JavaScript work with HTML+CSS?
Similar to both HTML and CSS, JavaScript has its purpose. In other threads, I explained what both HTML and CSS were and their purpose. Just a refresher: HTML is the structure of a webpage and CSS is used to style the appearance of the webpage.
Now, what does JavaScript do? JavaScript makes your basic HTML/CSS document or webpage more interactive. It can be used to update content, animate images, control multimedia, display prompts etc. It can give the viewer warnings stating that their password does not meet requirements, or give a specific message like good morning or good afternoon. JavaScript can make your site do a lot of great things, you just need to conquer it. Remember JavaScript is a scripting language so you set a set of instructions and the browser will execute them.

Adding JavaScript within your HTML Document:
Although not particularly recommended, you can add JavaScript within your HTML document by using the <script></script> tag. An example is below:
HTML:
<!DOCTYPE html>
    <head></head>
    <body>
    <h1>Hello World!</h1>
        <script>
            document.write(‘Hello World!’); // Will print off “Hello World!”
        </script>
    <body>
</html>

Adding JavaScript with an external document:
A more practical way of adding JavaScript to your website is by creating a separate JavaScript file and linking it to your HTML document. Similar to the way of including an external CSS file. You can identify a JavaScript file by looking for the file extension .js.​
Within your HTML document under the <head> tag:​
HTML:
<head>
    <script src=”js/javascript.js”></script>
</head>

The src attribute is the file path to your .js file.

Helpful sources:
JavaScript & Jquery by Jon Duckett
 
Last edited:
Just to add as a Note, JavaScript is not Java. They are both completely different Languages for completely different Tasks.

JavaScript is used for Websites, adding Functionality to them and making them more Dynamic.

Java on the other hand is used for Banks, Software and Android Apps.

Always remember that both Languages are completely different in terms of Functionality, Tasks and Syntax, despite the Name.
 
Just to add as a Note, JavaScript is not Java. They are both completely different Languages for completely different Tasks.

JavaScript is used for Websites, adding Functionality to them and making them more Dynamic.

Java on the other hand is used for Banks, Software and Android Apps.

Always remember that both Languages are completely different in terms of Functionality, Tasks and Syntax, despite the Name.
Thanks for pointing this out! :)
 
JavaScript is a high-level programming language commonly used to create interactive web pages and web applications. It is a client-side language that runs on the user's web browser, allowing developers to add dynamic content and interactivity to their web pages. JavaScript can also be used on the server-side with Node.js. It is an essential tool for modern web development and is supported by all major browsers.

Please read this article to know more about the uses of Javascipt What is JavaScript Used For? [A Beginner's Step-by-Step Guide]
 
Last edited by a moderator:
Yeah. JS cant be considered anymore as front-end language for websites. Its actually a very powerful and popular for backend works aswell. Though, all the tutorials are not yet updated for that fact.

In generally, i think that in gaming, JS has already significant footsteps around everwhere.
 
All of you are absolutely positively utterly WRONG!
Javascript is to the world, what staying out in the sun too long is to us humans... CANCER

PROVE ME WRONG...
Star Wars Laugh GIF by Disney+
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom