wtfacademy / wtf-javascript Goto Github PK
View Code? Open in Web Editor NEW我最近在重新学 JavaScript, 巩固一下细节, 也写一个“WTF JavaScript极简入门”,供新人学习。
License: MIT License
我最近在重新学 JavaScript, 巩固一下细节, 也写一个“WTF JavaScript极简入门”,供新人学习。
License: MIT License
习题
补全下面的 isDev 函数,完成逻辑,当输入的对象 obj 的 isDeveloper 属性为 true 时,返回 true,否则返回 false。
function isDev(obj){
}
const obj1 = {
name: "0xAA";
isDeveloper: true;
}
const obj2 = {
name: "Trump";
}
console.log(isDev(obj1)); // 应该输出 true
console.log(isDev(obj2)); // 应该输出 false
// 返回 x 和 z 之中更大的数
//let bigger = x < z ? x : z; 不對
let bigger = x < z ? z : x;
console.log(bigger);
原文:你一定哟好好掌握
应改成: 你一定要好好掌握
node:internal/deps/undici/undici:12443
Error.captureStackTrace(err, this);
^
TypeError: fetch failed
at node:internal/deps/undici/undici:12443:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getBaycMetadata (/Users/user/Desktop/code/wtf-js/10.js:41:22) {
cause: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:7595:28)
at node:internal/deps/undici/undici:7551:50
at Immediate._onImmediate (node:internal/deps/undici/undici:7583:13)
at process.processImmediate (node:internal/timers:478:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
原文: console.log(sumOdd([2, 4, 6, 8, 10])) // 应该返回 30
应改成: 应该返回0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.