Check out example codes for "js". It will help you in understanding the concepts better.

Code Example 1

var hungry=true;
var slow=true;
var anxious=true;

//&& means and
if(hungry && slow && anxious){ 
	var cause="weed";
}

Code Example 2

<script type="text/javascript">//Learn js today</script>

Code Example 3

<script type="text/javascript"></script>

Code Example 4

/* JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions.
While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. */

Code Example 5

JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled
programming language with first-class functions. While it is most 
well-known as the scripting language for Web pages, many non-browser
environments also use it, such as Node.js, Apache CouchDB and Adobe
Acrobat.

Code Example 6

JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled
programming language with first-class functions.

While it is most well-known as the scripting language for Web pages,
many non-browser environments also use it, such as Node.js, Apache
CouchDB and Adobe Acrobat.

Learn ReactJs, React Native from akashmittal.com