practice ground #random JS

In this example below you will see how to do a practice ground #random JS with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 120hit, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 120hit ©
  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>practice ground #random JS</title>
  
  
  
  
  
</head>

<body>

  
  
  

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




</body>

</html>

/*Downloaded from https://www.codeseek.co/120hit/practice-ground-random-js-QqEPQv */
document.write("x + x = ", x + x , )

== , this is equals to 
!= , this is not equal to

var greeting = "hello";

greeting + "world";

var x = "who is there? \"it is it \"";

var x = [
  ["who is there?"],
  ["it is i, it"]
];

console.log(x[0]);


in js if there is a quote you want to add
then the best method you can use is called the 
back slash \\ 

ex
"who is there? \"it is me\"";

"whos is there \"it is me\"";

just remember that the first slash is outside the quote and the last slash is on the inside of the quote followed by two attacthed double quote.

/n is new line 
/t is tab the code
x
  d 
-------------------------------
var x = [null];

 x.map
------------------------------------------------
Example of strongly typed programming language code

int count = 1;
string name = "Julia";
double num = 1.2932;
float price = 2.99;
Equivalent code in JavaScript

// equivalent code in JavaScript
var count = 1; 
var name = "Julia";
var num = 1.2932;
var price = 2.99;
  
----------------------------------
  When you use the == or != operators, JavaScript first converts each value to the same type (if they’re not already the same type); this is why it's called "type coercion"! This is often not the behavior you want, and it’s actually considered bad practice to use the == and != operators when comparing values for equality.

Strict equality
Instead, in JavaScript it’s better to use strict equality to see if numbers, strings, or booleans, etc. are identical in type and value without doing the type conversion first. To perform a strict comparison, simply add an additional equals sign = to the end of the == and != operators.

"1" === 1

var rohit = "today he is busy with studying code";
var phone = "rohit will not use his phone till the review sections are done in udacity intro to javascript and also the" + 
"lesson 7 on objects";

console.log(rohit + phone)

Comments