Skip to content

Instantly share code, notes, and snippets.

View ashish9342's full-sized avatar
😪

Ashish Singh Rawat ashish9342

😪
View GitHub Profile
//Uncaught ReferenceError: str1 is not defined
console.log(str1);
@ashish9342
ashish9342 / Variable Hoisting
Last active October 22, 2018 18:59
Hoisting
//Variable Hoisting
console.log(str); // undefined
var str = 'hello world';
console.log(str); //hello world
console.log("Hello World!!!")
<html>
<head>
<title>API Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var accessToken = "<your agent's client access token>";
var baseUrl = "https://api.api.ai/v1/";
@ashish9342
ashish9342 / eloquentjavascript-02-01.js
Created December 12, 2016 10:57 — forked from a1ip/eloquentjavascript-02-01.js
Solutions for Exercises from Eloquent Javascript http://eloquentjavascript.net/
// Looping a triangle
// http://eloquentjavascript.net/2nd_edition/preview/02_program_structure.html
var s = '';
for (var i=1;i<=7;i++){
s += '#';
console.log(s);
}