Skip to content

Instantly share code, notes, and snippets.

View kanayannet's full-sized avatar

kanayannet kanayannet

View GitHub Profile

2018年度活動記録

  • Gunma.web #30
    • 1/20 開催
  • Gunma.web #31
    • 4/21 開催
  • Gunma.web #32
    • 7/7 開催
  • Gunma.web #33
    • 10/6 開催
"use strict";
global = "global hensuu"; // ReferenceError: assignment to undeclared variable global
function func(){
console.log(global);
var global = "local";
console.log(global);
}
func();
"use strict";
var global = "global hensuu";
function func(){
console.log(global); // undefined # "global hensuu ではない"
var global = "local";
console.log(global); // local
}
func();
global = "global hensuu";
function func(){
"use strict";
console.log(global); // undefined # "global hensuu ではない"
var global = "local";
console.log(global); // local
}
func();
function Gadget()
{
var specs = {
width:300,
height:400,
};
this.get_specs = function()
{
return specs;
@kanayannet
kanayannet / gist:3858896
Created October 9, 2012 13:43
new iroiro test
function Gadget()
{
var specs = {
width:300,
height:400,
};
this.get_specs = function()
{
return specs;
};
@kanayannet
kanayannet / gist:2600565
Created May 5, 2012 07:09
makiage test
var aaa = 1;
function bbb() {
"use strict";
alert(aaa); // undefined
var aaa = 2;
alert(aaa); // 2
}
bbb();
@kanayannet
kanayannet / gist:1278257
Created October 11, 2011 14:38
open id(perlライブラリ) の sample script
#!/usr/bin/perl
use strict;
use Net::OpenID::Consumer::Lite;
my $check_url = Net::OpenID::Consumer::Lite->check_url
(
'https://www.hatena.ne.jp/openid/server',
'http://gunma-note.org/'
@kanayannet
kanayannet / gist:1139653
Created August 11, 2011 13:30
tkbjs_array2
Function.prototype.method = function(name,func)
{
this.prototype[name] = func;
return this;
}
Array.method('unshift' , function () {
this.splice.apply(this,[0,0].concat(Array.prototype.slice.apply(arguments)));
return this.length;
});
<html>
<head>
<script language=javascript>
<!--
Function.prototype.method = function(name,func)
{
this.prototype[name] = func;
return this;
};