Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. 'use strict'
  2. var r1,r2,s=null;
  3. try{
  4. r1=s.length; //产生错误
  5. r2=100; //此语句不会执行
  6. } catch(e){
  7. console.log('error'+e);
  8. } finally{
  9. console.log('finally');
  10. }
  11.  
  12. console.log(r1); //undefined
  13. console.log(r2); //undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement