码迷,mamicode.com
首页 > 编程语言 > 详细

javascript 模块、函数、语句的前面的分号“;”的含义

时间:2015-04-25 12:16:33      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:

强行和别的语句做一个分割,因为有可能前面的语句,或者别人的代码最后一行没有;号作为代码的结束,可能会导致错误。所以加一个;号,作为切割。

例如下面的代码:

/*!
 * Nestable jQuery Plugin - Copyright (c) 2012 David Bushell - http://dbushell.com/
 * Dual-licensed under the BSD or MIT licenses
 */
;(function($, window, document, undefined)

技术分享

javascript 模块、函数、语句的前面的分号“;”的含义

标签:

原文地址:http://blog.csdn.net/fox_lht/article/details/45268691

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!