2つの日付の値を比較するJavaScriptプログラム
例:2つの日付の値を比較する // program to compare value of two dates // create two dates const d1 = new Date(); const d2 = […]
Continue ReadingShare to be Shared!
例:2つの日付の値を比較する // program to compare value of two dates // create two dates const d1 = new Date(); const d2 = […]
Continue Reading例:現在の日付を表示する // program to display the date // get local machine date time const date = new Date(); // get the […]
Continue Reading例1:日付をフォーマットする // program to format the date // get current date let currentDate = new Date(); // get the day […]
Continue Reading次の条件が満たされている場合、1年はうるう年です。 年はの倍数です 400。 年はの倍数です 4 の倍数ではありません 100。 例1:if … elseを使用してうるう年を確認する // program t […]
Continue Reading例:日付と時刻を表示する // program to display the date and time // get date and time const date = new Date(2017, 2, 12, 9 […]
Continue Reading例1:正規表現を使用してすべての改行を置き換える // program to replace all line breaks in a string with <br> const string = `I a […]
Continue Reading例1:正規表現を使用して文字のすべてのインスタンスを置き換える // program to replace all instances of a character in a string const string = […]
Continue ReadingBase64 は、バイナリデータを基数64表現に変換することにより、ASCII文字列形式でバイナリデータを表すバイナリからテキストへのエンコードスキームのグループです。 例1:btoa()を使用して文字列をBase64に […]
Continue Reading例1:toUpperCase()の使用 // program to perform case insensitive string comparison const string1 = ‘JavaScript Progr […]
Continue Reading例1:includes()を使用して文字列をチェックする // program to check if a string contains a substring // take input const str = pr […]
Continue Reading