📄 compacting-conditions.js
字号:
// Please note: this file contains snippets for comparison
// it is not self-contained or ready-to-use code as such
function getFirstElement(root, tag)
{
var collection = root.getElementsByTagName(tag);
if (collection.length > 0)
{
var first = collection[0];
}
else
{
var first = null;
}
return first;
}
function getFirstElement(root, tag)
{
var collection = root.getElementsByTagName(tag);
var first = collection.length > 0 ? collection[0] : null;
return first;
}
function getFirstElement(root, tag)
{
var collection = root.getElementsByTagName(tag);
return collection.length > 0 ? collection[0] : null;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -