Student Summer Sprint
  • Welcome to Hackathons for Schools Student Summer Sprint!
  • Event Information
  • What is the Student Summer Sprint?
  • Useful Event Information and Links
  • Schedule
  • Our Organisers, Panelists and Mentors
    • Organisers
    • Panelists and Speakers
    • Mentors
  • Project Details
    • Themes
    • Judging Criteria and Winning Teams
    • Presentation Advice
    • Submission Checklist and FAQs
  • Coding Platform and GitLab
  • Technical Workshops
    • How to Use Git
      • Git and the Terminal
      • How to use Git - The Basics
      • Branching, Merging and Other Useful Commands
      • How to use Git - Further Resources
    • Web Development
      • HTML
      • CSS
      • JavaScript
      • Web Development - Resources
    • Introduction to Python
      • Variables
      • Data Types and String Formatting
      • Input and Output
      • Conditional Statements
      • Functions
      • Libraries
      • CHALLENGES
        • Solutions
      • Learning Python - Resources
    • Discord Bots in Python
      • Discord Bots - Resources
    • Web Scraping in Python
  • Careers Advice and Opportunities
    • University Advice
      • University Advice - Further Resources
    • CV, Applications and Interviews
      • Creating a Great CV
      • UCAS Personal Statement Advice
      • Interview Hints and Tips
      • Ultimate LinkedIn Guide
      • Applications - Further Resources
    • Different routes into a tech career
      • Different Routes into Tech - Further Resources
    • What Now?
      • More Opportunities!
Powered by GitBook
On this page
  • Including JS scripts in HTML files
  • JQuery
  • Bootstrap

Was this helpful?

  1. Technical Workshops
  2. Web Development

JavaScript

JavaScript (JS) is a programming language that is used to create interactive websites.

PreviousCSSNextWeb Development - Resources

Last updated 4 years ago

Was this helpful?

Including JS scripts in HTML files

In HTML, JavaScript code is inserted between <script> and </script> tags. Alternatively, you can include a separate .js file. For example:

<script>
    document.getElementById("demo").innerHTML = "My First JavaScript";
</script>

Or

<script src="script.js"></script>

Variables

JavaScript variables are containers or storing data values. To declare a variable, we can use the keyword “var”. For example:

var myNumber = 1;
var myColor = "Red";

To find out more about variables, go to

Functions

A JavaScript function is a block of code designed to perform a particular task. A JavaScript function is executed when "something" invokes it (calls it). To create a function we use the keyword “function”. For example:

function myFunction(p1, p2) {
    return p1 * p2; // The function returns the product of p1 and p2
}

JQuery

jQuery is a JavaScript library which greatly simplifies JavaScript programming. The purpose of jQuery is to make it much easier to use JavaScript on your website.

Bootstrap

Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Grid system

To learn about JQuery:

To learn more about JS

The most important thing about bootstrap is its grid system. To learn about the grid system and how you can create responsive websites using bootstrap, check out this tutorial:

To learn more about Bootstrap, you can read the official documentation here:

https://www.w3schools.com/js/js_variables.asp
https://www.w3schools.com/jquery/default.asp
https://www.w3schools.com/js/default.asp
https://getbootstrap.com/docs/4.0/layout/grid/
https://getbootstrap.com/docs/4.0/getting-started/introduction/