js 預(yù)編譯

http://fonts.googleapis.com/css?family=Fruktur

css3 樣式

border-radius: 50px 0 0 50px;

box-shadow:4px 2px 6px #f00, -4px -2px 6px #000, 0px 0px 12px 5px #33CC00 inset;


// JS 進(jìn)行三部曲

// 1. 預(yù)編譯? --implay globle

-如果變量未經(jīng)聲明就賦值,此變量為全局變量所有

-一切聲明的全局變量,都是 window 屬性

【window就是全局】

預(yù)編譯發(fā)生在函數(shù)執(zhí)行的前一刻

--預(yù)編譯四部曲

1??創(chuàng)建 OA 對(duì)象

2??找形參和變量,將之作為 OA 的屬性名,值為 undefined

3??將實(shí)參和形參統(tǒng)一

4??在函數(shù)體里找函數(shù)聲明,值賦予函數(shù)體

// JS 進(jìn)行三部曲

// 1. 預(yù)編譯? --implay globle

// console.log(a);

// var a = 1;

//測(cè)試 函數(shù)輸出什么? 預(yù)編譯1??

// function test(a,b){

//? ? console.log(a);

//? ? c = 0;

//? ? var c;

//? ? a = 3;

//? ? b = 2;

//? ? console.log(b);

//? ? function b () {}

//? ? function d () {}

//? ? console.log(b);

// }

// test(1);


//2??

// function fn(a){

//? ? console.log(a);

//? ? var a = 123;

//? ? console.log(a);

//? ? function a () {}

//? ? console.log(a);

//? ? var b = function () {}

//? ? console.log(b);

//? ? function d(){}

// }

// fn(1);

//3??

// function test(a,b){

//? ? console.log(a);//function

//? ? console.log(b);//undefined

//? ? var b = 234;

//? ? console.log (b);//234

//? ? a = 123;

//? ? console.log(a); //123

//? ? function a (){}

//? ? var a;

//? ? b = 234;

//? ? var b = function ( ){}

//? ? console.log(a);//123

//? ? console.log(b);//function

// }

// test(1);


///4??

// a = 100;

// function demo(e){

//? ? function e(){}

//? ? arguments[0] = 2;

//? ? console.log(e);//2

//? ? if(a){

//? ? ? ? var b = 123;

//? ? ? ? function c(){

//? ? ? ? }

//? ? }

//? ? var c;

//? ? a = 10;

//? ? var a;

//? ? console.log(b);//unde

//? ? f = 123;

//? ? console.log(c);//undefined

//? ? console.log(a);//10

// }

// var a;

// demo(1);

// console.log(a);//100

// console.log(f);//123

// 5??

//typeof(null) 返回的是 object; typeof(a)返回“undefined”

// var str = false + 1;

// document.write(str);//數(shù)字相加等于數(shù)字,false = 0,故答案為 1;

// var demo = false == 1;

// document.write(demo);//false

// if(typeof(a)&&-true + (+undefined) + ""){

// //計(jì)算了好久,這里 = -1 + NaN + "" = "NaN", Boolean("NaN") = true

//? ? document.write('基礎(chǔ)扎實(shí)');

// }

// if(11 + '11' * 2 == 33){

//? ? document.write('基礎(chǔ)扎實(shí)2');

// }?

// !!" " + !!"" - !!false||document.write('打印');

// // true + false - false = 1;

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容