私はreact native
を学んでいます。以下のコードの場合:私の関数が呼び出され、その内部に何が実行されたのですか?コンソールで `未定義 'になります
2222222
111111111
undefined
33333333
とsdsd
デバイスの画面上:
import React, { Component } from 'react';
import { View, Text } from 'react-native';
export default class App extends Component {
highlight() {
console.log(111111111);
}
render() {
console.log(222222);
console.log(this.highlight());
console.log(333333);
return (
<View>
<Text>sdsd</Text>
</View>
);
}
}
私はコンソールでこの出力を取得します。それは何ですか?undefined
?もしそれがundefined
の場合、それはどのように関数内のログを実行しましたか?