
面试题
文章平均质量分 59
面试题总结
Veranew
这个作者很懒,什么都没留下…
展开
-
面试题: http和websocket关系及理解
http和websocket关系及理解http和websocket都是基于TCP的应用层的协议。用于客户端和服务端之间的通信。基于http的协议,因为简单,被广泛应用,但是它本身是有一些缺陷的。比如使用http协议弹指服务器上是否有内容更新,就必须频繁地从客户端向服务端进行确认。如果服务器上没有更新,就会产生徒劳的通信。websocket是使用浏览器进行全双工通信。由于是建立在http基础上的协议,因此连接的发起方仍是客户端,而一旦建立websocket通信连接,不论是服务器还是客户端,任意一方都可原创 2021-04-12 16:53:24 · 1256 阅读 · 0 评论 -
【刷题】Who likes it?
原题目:You probably know the “like” system from Facebook and other pages. People can “like” blog posts, pictures or other items. We want to create the text that should be displayed next to such an item...原创 2019-12-09 11:33:17 · 597 阅读 · 0 评论 -
【刷题】把字符串中包含5个和5个以上的单词翻转,输出新字符串
原题目:Write a function that takes in a string of one or more words, and returns the same string, but with all five or more letter words reversed (Just like the name of this Kata). Strings passed in wi...原创 2019-12-09 10:15:35 · 530 阅读 · 0 评论 -
【刷题】求两个整数之间所有整数的和
原题目:Given two integers a and b, which can be positive or negative, find the sum of all the numbers between including them too and return it. If the two numbers are equal return a or b.Note: a and b...原创 2019-12-05 16:50:09 · 2500 阅读 · 0 评论 -
【刷题】将字符串的后四位显示,其他全部变成“#”
原题目:Usually when you buy something, you’re asked whether your credit card number, phone number or answer to your most secret question is still correct. However, since someone could look over your sh...原创 2019-12-05 15:43:51 · 513 阅读 · 0 评论 -
【刷题】将字符串中的所有元音字母删除,返回删除后的新字符串(js)
原题目:Trolls are attacking your comment section!A common way to deal with this situation is to remove all of the vowels from the trolls’ comments, neutralizing the threat.Your task is to write a fun...原创 2019-12-05 15:10:26 · 1361 阅读 · 0 评论 -
Promise和setTimeout执行顺序的问题
关于Promise和setTimeout执行顺序的问题,先看一道题:写出console.log输出的值: console.log('one'); setTimeout(function(){ console.log('two'); },0); Promise.resolve().then(function(){ console.log('three'); }) ...原创 2019-12-04 14:52:04 · 449 阅读 · 0 评论 -
面试题--JS基础(一)
面试题–JS基础1. JavaScript的typeof返回哪些数据类型会返回5种数据类型和一种函数类型 number string boolean undefined object functionalert( type of 1 ) // numberalert( type of "zhangsan" ) // stringalert( typeo...原创 2019-09-18 19:12:17 · 187 阅读 · 1 评论