1
$\begingroup$

I am planning to make a free JavaScript online video series. The first chapter covers the Javascript history and its capabilities. Following is a transcript of the video.

I would like it to be reviewed by someone good at JavaScript. Check for the correctness, the accuracy of facts, and any other suggestions or improvements that might seem necessary. I would especially require scrutiny in the 'abilities' section of the script to see if the definitions hold true.


Javascript History and Capabilities

  • JavaScript was created at Netscape Communications by Brendan Eich and his team in 10 days, in May 1995. Its syntax and functionality were inspired by Java, Scheme, and Self.

  • Javascript was first named as Mocha, later renamed as LiveScript. LiveScript was again renamed to JavaScript to gain popularity as the 'younger brother' of Java

  • JavaScript was meant to manipulate web pages by modifying the DOM to show, hide or change content dynamically

  • Is used for online form submissions and animations.

  • It is the Defacto client-side scripting language of browsers, a popular choice on servers as well.

  • ECMAScript is a scripting language specification standardized by Ecma International, it is a set of guidelines to design a scripting language. JavaScript is an implementation of ECMAScript

  • Javascript is a scripting language since it is interpreted by browsers and there is no intermediate compiled code. Modern browsers now use JIT compilers to 'semi compile' it in order to optimize its execution

  • Javascript is single-threaded to minimize complexities with concurrency

  • In browsers and servers Javascript codes are parsed (read) inside an environment called Javascript Engine. Javascript engine compiles it to machine language and instructs the OS to execute the instructions

  • Some notable javascript engines are

    • V8 – in Chrome and Opera.
    • SpiderMonkey – in Firefox.
    • ChakraCore - in Microsoft Edge.
    • Nitro or SquirrelFish - in Safari
  • Abilities

    • can run multiple tasks simultaneously without blocking any of the tasks (Asynchronous)
    • can exchange data asynchronously with a server across a network (Fetch API or AJAX)
    • can react to user actions such as mouse click, keypress, etc (event handling)
    • can switch between tasks in a single-threaded execution (concurrency)
    • can make use of object-oriented concepts (prototype-based Object Model)
    • can manipulate DOM of the browser to change the display of the webpage
    • can store data locally on browsers (cookies, local storage, etc)
  • Restrictions placed in the browser for the sake of data safety

    • Does not provide low-level CPU and memory access
    • Cannot implicitly access files or OS functions
    • users need to explicitly provide file access by input tags as well as for input device access such as camera and microphone, cannot access other tabs of the browser.
    • It follows the 'same-origin policy' wherein javascript from one domain cannot access resources from a different domain if it doesn't have a CORS header
  • Javascript running on the server side have full access to the file system, input devices, and OS functions. it does not follow 'same-origin policy'

  • Javascript Capabilities depend on the implementation of the javascript engine and the interfaces provided to it by the environment.

  • Other languages compile into javascript which is then parsed by javascript engines. One such notable language is TypeScript which adds strict typing and object orientation.

$\endgroup$
  • 2
    $\begingroup$ Since I know this is going to get flagged, I will preemptively post this: before flagging to close the question, please read the description for the curriculum-review tag. This is one of a handful of special tags available on this site that are a little different from many of the other sites. I haven't examined this question closely, but my instinct is that, with maybe a little editing, it reasonably follows the model required by the tag. $\endgroup$ – Ben I. Oct 25 '19 at 16:53
  • $\begingroup$ You don't seem to say much of anything about the structure of javascript at all. The fact that it is prototype based OO language is interesting, at least. $\endgroup$ – Buffy Oct 27 '19 at 13:10
  • 1
    $\begingroup$ @Dheeraj I've added it back in; it's the tag that allows this sort of question. $\endgroup$ – Ben I. Oct 27 '19 at 15:02
  • $\begingroup$ @Buffy How can i add more structure to it? did you mean adding more syntax and examples? those would come in the later chapters where i go deep into each of the concepts $\endgroup$ – Dheeraj Oct 28 '19 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.