What is JavaScript?
Introduction to JavaScript
It's very common to see JavaScript referred to as one of the three core languages of web pages.
- HTML markup language for content and structure. What's your headline, how many divisions are in your page, how many paragraphs do you have, what are the contents of those paragraphs?
- CSS, the style sheet language, for presentation. What font does the headline use, what's the background color of the page, what's the width of the div that the paragraphs are in?
- JavaScript, the programming language for your behavior and interactivity. What happens when you mouse over a menu, what happens when you type the wrong value in a form field, how long does a photo slideshow take to move from one image to the next?
What is a Scripting Language
JavaScript is a programming language that you often hear it referred to as a scripting language, and sometimes you hear some software developers dismiss JavaScript as just being a scripting language.
This is because JavaScript is intentionally limited, so we can't write a desktop application in JavaScript the way we might do with C++, Java, .NET etc. JavaScript only works inside another application, the web browser. Whether that's IE or Safari or Firefox or Chrome or Opera, they all have a JavaScript engine inside them. The operating system runs the web browser, the web browser contains a page, and the page contains the JavaScript. Now another way JavaScript is limited is that yes, it doesn't have access to the file system of the computer that it's running on. There are no words in JavaScript to open or save local files because that would be a security risk.
There are no words in JavaScript to talk to a database or target a USB port. And that strikes some software developers as odd because most languages are all about input and output, and JavaScript isn't. But of course, they're missing the point. JavaScript wasn't designed as a general purpose programming language; it was designed to manipulate web pages and it does that very well.
Latest Post
- Dependency injection
- Directives and Pipes
- Data binding
- HTTP Get vs. Post
- Node.js is everywhere
- MongoDB root user
- Combine JavaScript and CSS
- Inline Small JavaScript and CSS
- Minify JavaScript and CSS
- Defer Parsing of JavaScript
- Prefer Async Script Loading
- Components, Bootstrap and DOM
- What is HEAD in git?
- Show the changes in Git.
- What is AngularJS 2?
- Confidence Interval for a Population Mean
- Accuracy vs. Precision
- Sampling Distribution
- Working with the Normal Distribution
- Standardized score - Z score
- Percentile
- Evaluating the Normal Distribution
- What is Nodejs? Advantages and disadvantage?
- How do I debug Nodejs applications?
- Sync directory search using fs.readdirSync