ecmaScript6では、returnに複数の値を設定・取り出せるようになりました。es6の形式でjavascriptを
書いているにも関わらずすぐ忘れてしまうので備忘録として残します。
function tip() { const str = "ポプテピック"; const int = 5; return {str,int}; } const {str, int} = tip();
思いつきそうで思いつかなかったtipsでした。
ecmaScript6では、returnに複数の値を設定・取り出せるようになりました。es6の形式でjavascriptを
書いているにも関わらずすぐ忘れてしまうので備忘録として残します。
function tip() { const str = "ポプテピック"; const int = 5; return {str,int}; } const {str, int} = tip();
思いつきそうで思いつかなかったtipsでした。