STUDY MEMO

学習のメモ書き

2021-04-05から1日間の記事一覧

< Node.js > twitter API v2のツイート取得

環境設定 You will need to have Node.js installed to run this code. All Node.js examples use needle as the HTTP client, which needs to be npm installed. For OAuth with user context requests, you'll need to install the got and oauth-1.0a pac…

< コマンド > ターミナル

環境変数についてのコマンド 環境変数を追加 環境変数の内容を確認する 環境変数を削除 環境変数の設置 環境変数の一覧 操作関連 finderを開く ディレクトリ関連 今どこのディレクトリにいるか調べる 隠しファイルやフォルダを表示 ruby関連 Rubyのバージョ…

<JavaScript> for文、while文

for文 let fruits = ["banana", "apple", "lemon"]; for (let i = 0; i < fruits.length; i++) { console.log(fruits[i]); } 実行結果 $ node test.js banana apple lemon while文 無限ループ while (true) { console.log("hello"); } 条件を満たしたら終了 …

<JavaScript> 関数

構文 function 関数名(引数){ 処理 }; 関数名(引数);で、{}内の処理が呼び出される。 引数有りの場合 function num(a) { console.log(a); } num(1); 実行結果 $ node test.js 1 引数なしの場合 function num() { console.log(1); } num(); 実行結果 $ node t…

<JavaScript> 配列

配列 配列の宣言と要素の挿入。 要素は添字で呼び出せる。 let array = [1, 2, "str", {}]; console.log(array[0]); console.log(array[1]); console.log(array[2]); console.log(array[3]); $ node test.js 1 2 str {} 配列の追加 後ろから追加するのは.pus…