上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 句子生成器程序之一 var randomBodyParts = ["Face", "Nose", "Hair"]; var randomAdjectives = ["Smelly", "Boring", "Stupid"]; var randomWords = ["Fly", "Marmot", " 阅读全文
posted @ 2016-12-02 20:33 balian 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 句子生成器程序之一 var randomBodyParts = ["Face", "Nose", "Hair"]; var randomAdjectives = ["Smelly", "Boring", "Stupid"]; var randomWords = ["Fly", "Marmot", " 阅读全文
posted @ 2016-10-21 14:19 balian 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 方法 - 把数组元素连接成一个字符串 .join() - .join(value) sample .join("*") var landmarks = [];landmarks.push("My House");landmarks.push("Front path");landmarks.push( 阅读全文
posted @ 2016-10-17 04:33 balian 阅读(144) 评论(0) 推荐(0) 编辑
摘要: var dinosaurs = ["T-Rex", "Velociraptor", "Stegosaurus", "Triceratios", "Brachiosaurus", "Pteranodon", "Aptaosaurus", "Diplodocus", "Compsognathus"]; 阅读全文
posted @ 2016-10-06 19:59 balian 阅读(272) 评论(0) 推荐(0) 编辑
摘要: var dinosaurs = ["T-Rex", "Velociraptor", "Stegosaurus", "Triceratios", "Brachiosaurus", "Pteranodon", "Aptaosaurus", "Diplodocus", "Compsognathus"]; 阅读全文
posted @ 2016-10-05 10:37 balian 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 布尔值只有 true 和 false,不能大写 && 与 读成 and|| 或 读成 or! 非 赌城 not 用来比较,如果是不同类型,结果是false,推荐坚持使用 用来比较,如果是不同类型,先转换。 null用来表示 没有值 阅读全文
posted @ 2016-09-24 11:35 balian 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 看一个字符串变量的长度,使用.length >"java" + "script".length <"java6" 获取某个字符串中的某个字母,用[] 截取字符串中的某几个字符,用.slice() .slice(3, 14) 表示截取 第3个到第13个字符,书中第24页有错。.slice(3)表示从第 阅读全文
posted @ 2016-09-22 10:22 balian 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 一些知识点, 使用IE和Chrome都可以调试,F12,接着使用console模式 数据类型 数字,字符串,布尔型变量名大小写敏感 注释方式两种 \\和 /* */ 字符串用双引号""。 阅读全文
posted @ 2016-09-21 10:03 balian 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 少于200字,就不发布到网站首页啦这是定制的。 阅读全文
posted @ 2014-03-26 19:57 balian 阅读(312) 评论(1) 推荐(0) 编辑
摘要: 这是自己做的练习,可能有错误,欢迎讨论和各种优化重构方案。 根据反馈,或者code review,对本篇文章答案或者相关内容的更新补充,一般会被添加在本篇博客的评论中。 将尽量保证每题的答案代码是完整的,不仅仅是函数,类或者只是个大概,力求打开Python 2.7的IDLE,将代码完整拷贝进去,就能调试运行。 欢迎访问Balian在博客园的家。 http://www.cnblogs.com/balian【这篇博文可能让人失望,对不起】14-9. Shells。创建shell(操作系统接口)程序。给出接受操作系统命令的命令行接口(任意平台)。 附加题1:支持管道(见... 阅读全文
posted @ 2013-04-10 10:12 balian 阅读(808) 评论(2) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页